[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 9fc6ef658bc4c1eb48cff8b9e0780679248c4c72

Guillaume Rousse guillaume at oberkampf.msr-inria.inria.fr
Sun Jan 3 20:44:45 UTC 2010


The following commit has been merged in the master branch:
commit 9fc6ef658bc4c1eb48cff8b9e0780679248c4c72
Author: Guillaume Rousse <guillaume at oberkampf.msr-inria.inria.fr>
Date:   Sun Jan 3 21:23:57 2010 +0100

    Revert "use _split_longopt", as wodim options don't use dashes
    
    This reverts commit f35923a50515c5bb0f3f843e7d6a99b979698e61.

diff --git a/contrib/wodim b/contrib/wodim
index c1c844a..ada800c 100644
--- a/contrib/wodim
+++ b/contrib/wodim
@@ -3,36 +3,37 @@
 have cdrecord || have wodim &&
 _cdrecord()
 {
-    local cur prev i generic_options track_options track_mode split=false
+    local cur prev i generic_options track_options track_mode
 
     COMPREPLY=()
     cur=`_get_cword`
     prev=${COMP_WORDS[COMP_CWORD-1]}
 
-    _split_longopt && split=true
-
-    case $prev in
-        textfile|cuefile)
-            _filedir
-            return 0
-            ;;
-        blank)
-            COMPREPLY=( $( compgen -W 'help all fast \
-                track unreserve trtail unclose session' \
-                -- "$cur" ) )
-            return 0
-            ;;
-        driveropts)
-            COMPREPLY=( $( compgen -W 'burnfree noburnfree\
-                varirec= audiomaster forcespeed noforcespeed\
-                speedread nospeedread singlesession \
-                nosinglesession hidecdr nohidecdr tattooinfo\
-                tattoofile=' -- "$cur" ) )
-            return 0
-            ;;
-    esac
-
-    $split && return 0
+    # foo=bar style option
+    if [[ "$cur" == *=* ]]; then
+        prev=${cur/=*/}
+        cur=${cur/*=/}
+        case $prev in
+            textfile|cuefile)
+                _filedir
+                return 0
+                ;;
+            blank)
+                COMPREPLY=( $( compgen -W 'help all fast \
+                    track unreserve trtail unclose session' \
+                    -- "$cur" ) )
+                return 0
+                ;;
+            driveropts)
+                COMPREPLY=( $( compgen -W 'burnfree noburnfree\
+                    varirec= audiomaster forcespeed noforcespeed\
+                    speedread nospeedread singlesession \
+                    nosinglesession hidecdr nohidecdr tattooinfo\
+                    tattoofile=' -- "$cur" ) )
+                return 0
+                ;;
+        esac
+    fi
 
     generic_options=(-version -v -V -d -silent -force -immed -dummy \
         -dao -raw -raw96r -raw96p -raw16 -multi -msinfo -toc \

-- 
bash-completion



More information about the Bash-completion-commits mailing list