Improve package name completion

This commit is contained in:
Igor Murzov 2010-07-05 13:40:39 +04:00
parent c54f41ff26
commit 1a7f095d95

View File

@ -62,8 +62,11 @@ _slapt-get()
case $t in case $t in
all) # --install|-i|--show|--filelist all) # --install|-i|--show|--filelist
COMPREPLY=( $( slapt-get --search "^$cur" 2> /dev/null | \ # slapt-get will fail to search for "^orc-0.4.4" for example
awk '{print $1}' ) ) # it can only search for names, so we should anything else
local name=$( echo $cur | cut -f1 -d- )
COMPREPLY=( $( slapt-get --search "^$name" 2> /dev/null | \
awk '{print $1}' | grep "^$cur" ) )
return 0 return 0
;; ;;
ins) # --remove ins) # --remove