[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-132-ge7cd7ba
Ville Skyttä
ville.skytta at iki.fi
Sun Feb 17 20:24:15 UTC 2013
The following commit has been merged in the master branch:
commit e4796104bc81247bceb591164b227b3cd762c46f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Feb 17 22:16:12 2013 +0200
vpnc: Use _parse_help instead of hardcoding options, add basic test case.
diff --git a/completions/vpnc b/completions/vpnc
index 0465c31..115aeb7 100644
--- a/completions/vpnc
+++ b/completions/vpnc
@@ -25,12 +25,8 @@ _vpnc()
esac
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '--version --print-config --help \
- --long-help --gateway --id --username --udp --domain \
- --xauth-inter --script --dh --pfs --enable-1des \
- --application-version --ifname --debug --no-detach \
- --pid-file --local-port --udp-port --disable-natt \
- --non-inter' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" --long-help )' \
+ -- "$cur" ) )
else
COMPREPLY=( $( compgen -W '$( command ls /etc/vpnc )' -- "$cur" ) )
fi
diff --git a/test/completion/vpnc.exp b/test/completion/vpnc.exp
new file mode 100644
index 0000000..29511b5
--- /dev/null
+++ b/test/completion/vpnc.exp
@@ -0,0 +1 @@
+assert_source_completions vpnc
diff --git a/test/lib/completions/awk.exp b/test/lib/completions/vpnc.exp
similarity index 80%
copy from test/lib/completions/awk.exp
copy to test/lib/completions/vpnc.exp
index 260dabc..451d809 100644
--- a/test/lib/completions/awk.exp
+++ b/test/lib/completions/vpnc.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "awk "
-
-
+assert_complete_any "vpnc -"
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list