Created
March 2, 2018 08:07
-
-
Save Baccata/e7354351379b6cf8ade49f7d71b53ea7 to your computer and use it in GitHub Desktop.
Very basic bash autocompletion support for mill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://debian-administration.org/article/317/An_introduction_to_bash_completion_part_2 | |
__mill() | |
{ | |
local cur prev opts | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
opts="$(echo $(mill resolve __ 2>/dev/null ) | sed 's/ / /g')" | |
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |
return 0 | |
} | |
complete -F __mill mill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just source it