[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-305-geefc69d

Ville Skyttä ville.skytta at iki.fi
Mon May 16 15:58:58 UTC 2011


The following commit has been merged in the master branch:
commit b7f1f74ba0c5bde38f1af46b77b133f9c8c33a1f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun May 15 20:16:49 2011 +0300

    ldapvi: Use _parse_help, add basic test case.

diff --git a/completions/ldapvi b/completions/ldapvi
index 3870109..124a349 100644
--- a/completions/ldapvi
+++ b/completions/ldapvi
@@ -46,18 +46,7 @@ _ldapvi()
     esac
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $( compgen -W '--discover --out --in --delete \
-            --rename -h --host -D --user -w --password --bind \
-            --bind-dialog -I --sasl-interactive --bind-dialog -O \
-            --sasl-secprops -Q --sasl-quiet -R --sasl-realm -U \
-            --sasl-authcid -X --sasl-authzid -Y --sasl-mech -b \
-            --base -s --scope -S --sort --add -o --class --config \
-            -c --continue --deleteoldrdn -a --deref -d --discover \
-            -A --empty --ncoding -H --help --ldap-conf -m --may -M \
-            --managedsait --noquestions -! --noninteractive -q \
-            --quiet -R --read -Z --starttls --tls -v --verbose \
-            --ldapsearch --ldapmodify --ldapdelete --ldapmoddn' \
-            -- "$cur" ) )
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
     fi
 } &&
 complete -F _ldapvi ldapvi
diff --git a/test/completion/ldapvi.exp b/test/completion/ldapvi.exp
new file mode 100644
index 0000000..2e3ddef
--- /dev/null
+++ b/test/completion/ldapvi.exp
@@ -0,0 +1 @@
+assert_source_completions ldapvi
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/ldapvi.exp
similarity index 79%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/ldapvi.exp
index 77cd07f..54c6277 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/ldapvi.exp
@@ -11,7 +11,7 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "a2ps "
+assert_complete_any "ldapvi -"
 
 
 sync_after_int

-- 
bash-completion



More information about the Bash-completion-commits mailing list