[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-426-gbae9934

Ville Skyttä ville.skytta at iki.fi
Tue Aug 23 17:27:03 UTC 2011


The following commit has been merged in the master branch:
commit bae99345fdd1297ebb31ab910a8cb063a359b43c
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Aug 23 20:26:06 2011 +0300

    idn: New completion.

diff --git a/completions/Makefile.am b/completions/Makefile.am
index 038959e..0cfea79 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -67,6 +67,7 @@ bashcomp_DATA = abook \
 		hping2 \
 		htpasswd \
 		iconv \
+		idn \
 		iftop \
 		ifupdown \
 		imagemagick \
diff --git a/completions/pwgen b/completions/idn
similarity index 63%
copy from completions/pwgen
copy to completions/idn
index 40bf376..fba95f0 100644
--- a/completions/pwgen
+++ b/completions/idn
@@ -1,29 +1,27 @@
-have pwgen || return
+have idn || return
 
-_pwgen()
+_idn()
 {
     local cur prev words cword split
     _init_completion -s || return
 
     case $prev in
-        -N|--num-passwords|-h|--help)
+        -h|--help|-V|--version)
             return
             ;;
-        -H|--sha1)
-            _filedir
+        -p|--profile)
+            COMPREPLY=( $( compgen -W 'Nameprep iSCSI Nodeprep Resourceprep
+                trace SASLprep' -- "$cur" ) )
             return
             ;;
     esac
 
-    $split && return
-
-    if [[ $cur == -* ]]; then
+    if ! $split && [[ $cur == -* ]]; then
         COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
-        return
     fi
 } &&
-complete -F _pwgen pwgen
+complete -F _idn idn
 
 # Local variables:
 # mode: shell-script
diff --git a/test/completion/idn.exp b/test/completion/idn.exp
new file mode 100644
index 0000000..5fccae3
--- /dev/null
+++ b/test/completion/idn.exp
@@ -0,0 +1 @@
+assert_source_completions idn
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/idn.exp
similarity index 80%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/idn.exp
index 77cd07f..4625c7e 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/idn.exp
@@ -11,7 +11,7 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "a2ps "
+assert_complete_any "idn -"
 
 
 sync_after_int

-- 
bash-completion



More information about the Bash-completion-commits mailing list