summaryrefslogtreecommitdiff
path: root/flowtop.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 /flowtop.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 'flowtop.zsh')
-rw-r--r--flowtop.zsh21
1 files changed, 21 insertions, 0 deletions
diff --git a/flowtop.zsh b/flowtop.zsh
new file mode 100644
index 0000000..1d1b2e7
--- /dev/null
+++ b/flowtop.zsh
@@ -0,0 +1,21 @@
+#compdef flowtop
+#
+# flowtop.zsh -- zsh completion function for flowtop
+#
+# 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
+
+_arguments -s -S \
+ "(-T --tcp)"{-T,--tcp}"[Show only TCP flows (default)]" \
+ "(-U --udp)"{-U,--udp}"[Show only UDP flows]" \
+ "(-s --show-src)"{-s,--show-src}"[Also show source, not only dest]" \
+ "--city-db[Specifiy path for geoip city database]:path:_files" \
+ "--country-db[Specifiy path for geoip country database]:path:_files" \
+ {-v,--version}"[Print version]:" \
+ {-h,--help}"[Print this help]:" \
+ "*::args:_gnu_generic"