summaryrefslogtreecommitdiff
path: root/curvetun.zsh
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-05-13 11:24:41 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-05-13 12:27:03 +0200
commit2b100f7515dbd01032967c2d1b81d2f8d63bf9b5 (patch)
tree968b9a17fc20f92c0d58cdd11ed49815d8b818f5 /curvetun.zsh
parentc59245ddcc0541edca71769b3153bc13580a5bbb (diff)
zsh: add netsniff-ng zsh auto completion support
Hideo Hattori wrote a set of auto completion scripts for zsh that support netsniff-ng tools. Big thanks for that! Follow-up commits still need to address updated command-line options. Signed-off-by: Hideo Hattori <hhatto.jp@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'curvetun.zsh')
-rw-r--r--curvetun.zsh36
1 files changed, 36 insertions, 0 deletions
diff --git a/curvetun.zsh b/curvetun.zsh
new file mode 100644
index 0000000..16a1fd3
--- /dev/null
+++ b/curvetun.zsh
@@ -0,0 +1,36 @@
+#compdef curvetun
+#
+# curvetun.zsh -- zsh completion function for curvetun
+#
+# Copyright (C) 2013 Hideo Hattori <hhatto.jp@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+
+typeset -A opt_args
+
+_interfaces () {
+ _wanted interfaces expl 'network interface' \
+ _net_interfaces
+ _values "Pseudo-device that captures on all interfaces" "any"
+}
+
+_arguments -s -S \
+ "(-k --keygen)"{-k,--keygen}"[Generate public/private keypair]" \
+ "(-x --export)"{-x,--export}"[Export your public data for remote servers]" \
+ "(-C --dumpc)"{-C,--dumpc}"[Dump parsed clients]" \
+ "(-S --dumps)"{-S,--dumps}"[Dump parsed servers]" \
+ "(-D --nofork)"{-D,--nofork}"[Do not daemonize]" \
+ "(-d --dev)"{-d,--dev}"[Networking tunnel device, e.g. tun0]:device:_interfaces" \
+ {-v,--version}"[Print version]:" \
+ {-h,--help}"[Print this help]:" \
+ "(-s --server -N --no-logging -p --port -t --stun -u --udp -4 --ipv4 -6 --ipv6 -c --client)"{-c,--client}"[Client mode, server alias optional]:client:_gnu_generic" \
+ "(-c --client -s --server)"{-s,--server}"[Server mode]" \
+ "(-c --client -N --no-logging)"{-N,--no-logging}"[Disable server logging (for better anonymity)]" \
+ "(-c --client -p --port)"{-p,--port}"[Port number (mandatory)]:port:_gnu_generic" \
+ "(-c --client -t --stun)"{-t,--stun}"[Show public IP/Port mapping via STUN]:stun:_gnu_generic" \
+ "(-c --client -u --udp)"{-u,--udp}"[Use UDP as carrier instead of TCP]" \
+ "(-c --client -4 --ipv4)"{-4,--ipv4}"[Tunnel devices are IPv4]" \
+ "(-c --client -6 --ipv6)"{-6,--ipv6}"[Tunnel devices are IPv6 (default: same as carrier protocol)]" \
+ "*::args:_gnu_generic"