The following commit has been merged in the master branch:
commit 1a7f095d95c58d82ac14b47f03fd38c92325a394
Author: Igor Murzov <[email protected]>
Date: Mon Jul 5 13:40:39 2010 +0400
Improve package name completion
diff --git a/contrib/slackware b/contrib/slackware
index 486e747..6e43c97 100644
--- a/contrib/slackware
+++ b/contrib/slackware
@@ -62,8 +62,11 @@ _slapt-get()
case $t in
all) # --install|-i|--show|--filelist
- COMPREPLY=( $( slapt-get --search "^$cur" 2> /dev/null | \
- awk '{print $1}' ) )
+ # slapt-get will fail to search for "^orc-0.4.4" for example
+ # 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
;;
ins) # --remove
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits