The following commit has been merged in the master branch:
commit cb0a514b9f8225ac4372b5eb2865b036aa6d61e7
Author: Sergey V <[email protected]>
Date:   Thu Jan 6 05:15:47 2011 +0300

    slackware: sbopkg: add completion for '-d' option

diff --git a/completions/slackware b/completions/slackware
index fc71d63..f537f5a 100644
--- a/completions/slackware
+++ b/completions/slackware
@@ -198,11 +198,16 @@ _sbopkg()
 
     . $config
 
-    for (( i=${#words[@]}-1; i>0; i-- )); do
-        if [[ ${words[i]} == '-V' ]]; then
-            REPO_NAME="${words[i+1]%%/*}"
-            REPO_BRANCH="${words[i+1]#*/}"
-        fi
+    for (( i=1; i<${#words[@]}; i++ )); do
+        case "${words[i]}" in
+            '-V')
+                REPO_NAME="${words[i+1]%%/*}"
+                REPO_BRANCH="${words[i+1]#*/}"
+                ;;
+            '-d')
+                REPO_ROOT="${words[i+1]}"
+                ;;
+        esac
     done
 
     case $prev in

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to