[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-235-g26ae770
Igor Murzov
igor at gplsoft.org
Mon May 2 10:27:42 UTC 2011
The following commit has been merged in the master branch:
commit 9c3077ee2aaaac67f13b2a1452230ddd810d41a8
Author: Igor Murzov <igor at gplsoft.org>
Date: Sun Dec 26 16:56:22 2010 +0300
Add missing completion for -e and -d options.
And also check that specified config location is correct once.
Signed-off-by: Sergey V <sftp.mtuci at gmail.com>
diff --git a/completions/slackware b/completions/slackware
index ae3c606..29e4d61 100644
--- a/completions/slackware
+++ b/completions/slackware
@@ -170,14 +170,12 @@ _sbopkg()
fi
done
- if [ -e "$config" ]; then
- . $config
- fi
-
if [ ! -r "$config" ]; then
return 0
fi
+ . $config
+
for (( i=${#words[@]}-1; i>0; i-- )); do
if [[ ${words[i]} == '-V' ]]; then
REPO_NAME=`echo ${words[i+1]} | cut -f1 -d/`
@@ -186,10 +184,18 @@ _sbopkg()
done
case $prev in
+ -e)
+ COMPREPLY=( $( compgen -W 'ask continue stop' -- "$cur" ) )
+ return 0
+ ;;
-f)
_filedir
return 0
;;
+ -d)
+ _filedir -d
+ return 0
+ ;;
-s|-g|-V)
return 0
;;
--
bash-completion
More information about the Bash-completion-commits
mailing list