The following commit has been merged in the master branch:
commit 4ea93b286e9e0cac9d4bd41cf5b17d78836adfc8
Author: Ville Skyttä <[email protected]>
Date:   Fri Apr 29 12:24:58 2011 +0300

    cryptsetup, wvdial: Use _split_longopt().

diff --git a/completions/cryptsetup b/completions/cryptsetup
index 46f1e48..f1dd1f3 100644
--- a/completions/cryptsetup
+++ b/completions/cryptsetup
@@ -17,15 +17,20 @@ _cryptsetup_device()
 _cryptsetup()
 {
     local cur prev words cword
-    _init_completion || return
+    _init_completion -n = || return
+
+    local split=false
+    _split_longopt && split=true
 
     case $prev in
         --key-file|--master-key-file|--header-backup-file|-d)
             _filedir
-            return 0;
+            return 0
             ;;
     esac
 
+    $split && return
+
     local arg
     _get_first_arg
     if [ -z $arg ]; then
diff --git a/completions/wvdial b/completions/wvdial
index 78ae25f..5b4f2b0 100644
--- a/completions/wvdial
+++ b/completions/wvdial
@@ -5,7 +5,10 @@ have wvdial || return
 _wvdial()
 {
     local cur prev words cword
-    _init_completion || return
+    _init_completion -n = || return
+
+    local split=false
+    _split_longopt && split=true
 
     case $prev in
         --config)
@@ -14,6 +17,8 @@ _wvdial()
             ;;
     esac
 
+    $split && return
+
     local config i IFS=$'\n'
 
     case $cur in

-- 
bash-completion

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

Reply via email to