[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-402-g602e983

Igor Murzov e-mail at date.by
Sun Jul 17 22:09:26 UTC 2011


The following commit has been merged in the master branch:
commit 602e9837b76c9b75c567ae395121656d437040e9
Author: Igor Murzov <e-mail at date.by>
Date:   Mon Jul 18 01:52:00 2011 +0400

    sbopkg: Fix options completion
    
    This is the regression introduced by commit ac79f44d90.
    Options completion broke due to *) presence in   case "$prev" in ...

diff --git a/completions/sbopkg b/completions/sbopkg
index 767660a..cec466e 100644
--- a/completions/sbopkg
+++ b/completions/sbopkg
@@ -7,6 +7,12 @@ _sbopkg()
     local cur prev words cword
     _init_completion || return
 
+    if [[ "$cur" == -* ]]; then
+        COMPREPLY=( $( compgen -W '-b -c -d -e -f -g -h -i -k -l \
+                      -o -P -p -q -R -r -s -u -V -v' -- "$cur" ) )
+        return 0
+    fi
+
     case "$prev" in
         -e)
             COMPREPLY=( $( compgen -W 'ask continue stop' -- "$cur" ) )
@@ -32,12 +38,6 @@ _sbopkg()
             ;;
     esac
 
-    if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $( compgen -W '-b -c -d -e -f -g -h -i -k -l \
-                      -o -P -p -q -R -r -s -u -V -v' -- "$cur" ) )
-        return 0
-    fi
-
     local i config
     config="/etc/sbopkg/sbopkg.conf"
     for (( i=${#words[@]}-1; i>0; i-- )); do

-- 
bash-completion



More information about the Bash-completion-commits mailing list