[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-2-gbffce42
Ville Skyttä
ville.skytta at iki.fi
Mon Jun 25 14:44:33 UTC 2012
The following commit has been merged in the master branch:
commit bffce4218e33bc61c0551b87e4b5bfbb41ad4223
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Mon Jun 25 17:44:11 2012 +0300
wsimport: New completion.
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 2a884e9..81c5e53 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -333,6 +333,7 @@ bashcomp_DATA = a2x \
withlist \
wodim \
wol \
+ wsimport \
wtf \
wvdial \
xfreerdp \
diff --git a/completions/wsimport b/completions/wsimport
new file mode 100644
index 0000000..9150484
--- /dev/null
+++ b/completions/wsimport
@@ -0,0 +1,49 @@
+# wsimport(1) completion -*- shell-script -*-
+
+_wsimport()
+{
+ local cur prev words cword
+ _init_completion -n : || return
+
+ case $prev in
+ -help|-version|-B|-p|-wsdllocation)
+ return
+ ;;
+ -b)
+ _filedir '@(xml|xjb)'
+ return
+ ;;
+ -catalog)
+ _filedir '@(xml|soc|catalog)'
+ return
+ ;;
+ -d|–s)
+ _filedir -d
+ return
+ ;;
+ -target)
+ COMPREPLY=( $( compgen -W '2.0 2.1 2.2' -- "$cur" ) )
+ return
+ ;;
+ -clientjar)
+ _filedir jar
+ return
+ ;;
+ esac
+
+ if [[ $cur == -httpproxy:* ]]; then
+ _known_hosts_real "${cur#-httpproxy:}"
+ return
+ elif [[ $cur == -* ]]; then
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' \
+ -- "$cur" ) )
+ [[ $COMPREPLY == *: ]] && compopt -o nospace
+ __ltrim_colon_completions "$cur"
+ return
+ fi
+
+ _filedir wsdl
+} &&
+complete -F _wsimport wsimport
+
+# ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/wsimport.exp b/test/completion/wsimport.exp
new file mode 100644
index 0000000..3f889e2
--- /dev/null
+++ b/test/completion/wsimport.exp
@@ -0,0 +1 @@
+assert_source_completions wsimport
diff --git a/test/lib/completions/abook.exp b/test/lib/completions/wsimport.exp
similarity index 78%
copy from test/lib/completions/abook.exp
copy to test/lib/completions/wsimport.exp
index 43f6272..36bf35c 100644
--- a/test/lib/completions/abook.exp
+++ b/test/lib/completions/wsimport.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "abook "
-
-
+assert_complete_any "wsimport "
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list