[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-139-ge38e68f

Ville Skyttä ville.skytta at iki.fi
Wed Mar 6 16:22:22 UTC 2013


The following commit has been merged in the master branch:
commit e38e68f96cd7d9d1c973462368003e12661305f9
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Mar 6 18:22:14 2013 +0200

    xxd: New completion.

diff --git a/completions/Makefile.am b/completions/Makefile.am
index 479cc09..8f1276a 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -370,6 +370,7 @@ bashcomp_DATA = a2x \
 		xrandr \
 		xrdb \
 		xsltproc \
+		xxd \
 		xz \
 		xzdec \
 		ypmatch \
diff --git a/completions/ssh-add b/completions/xxd
similarity index 53%
copy from completions/ssh-add
copy to completions/xxd
index 1d56368..050a2b6 100644
--- a/completions/ssh-add
+++ b/completions/xxd
@@ -1,23 +1,23 @@
-# ssh-add(1) completion                                    -*- shell-script -*-
+# xxd(1) completion                                        -*- shell-script -*-
 
-_ssh_add()
+_xxd()
 {
     local cur prev words cword
     _init_completion || return
 
     case $prev in
-        -t|-s|-e)
+        -h|-help|-c|-cols|-g|-groupsize|-l|-len|-s|-seek|-v|-version)
             return
             ;;
     esac
 
     if [[ $cur == -* ]]; then
-        COMPREPLY=( $( compgen -W '$( _parse_help "$1" -? )' -- "$cur" ) )
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) )
         return
     fi
 
     _filedir
 } &&
-complete -F _ssh_add ssh-add
+complete -F _xxd xxd
 
 # ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/xxd.exp b/test/completion/xxd.exp
new file mode 100644
index 0000000..d9750e4
--- /dev/null
+++ b/test/completion/xxd.exp
@@ -0,0 +1 @@
+assert_source_completions xxd
diff --git a/test/lib/completions/eog.exp b/test/lib/completions/xxd.exp
similarity index 81%
copy from test/lib/completions/eog.exp
copy to test/lib/completions/xxd.exp
index b708c56..6f12c0c 100644
--- a/test/lib/completions/eog.exp
+++ b/test/lib/completions/xxd.exp
@@ -11,7 +11,7 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "eog "
+assert_complete_any "xxd "
 sync_after_int
 
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list