Merge pull request #196 from oderwat/SmartUninstallCompletion
Smarter uninstall Bash completion.
This commit is contained in:
commit
aa3ee0942e
1 changed files with 4 additions and 1 deletions
|
|
@ -20,9 +20,12 @@ _nimble()
|
|||
install)
|
||||
COMPREPLY=( $( nimble list 2> /dev/null | grep "^$cur" | grep -v '^ ' | tr -d ':') )
|
||||
;;
|
||||
path|uninstall)
|
||||
path)
|
||||
COMPREPLY=( $( nimble list -i 2> /dev/null | cut -d' ' -f1 | grep "^$cur" ) )
|
||||
;;
|
||||
uninstall)
|
||||
COMPREPLY=( $( nimble list -i 2> /dev/null | awk -F'( |\\[|\\])' '{ f=4; while($f) { l=length($f); if(substr($f, l, l)==",") { $f=substr($f, 0, l-1) }; print $1 "@" $f; f++; }}' | sort -f | grep "^$cur" ) )
|
||||
;;
|
||||
list)
|
||||
COMPREPLY=( $( compgen -W '--ver -i --installed' -- $cur ) )
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue