summaryrefslogtreecommitdiff
path: root/completions/hping2
diff options
context:
space:
mode:
Diffstat (limited to 'completions/hping2')
-rw-r--r--completions/hping228
1 files changed, 4 insertions, 24 deletions
diff --git a/completions/hping2 b/completions/hping2
index e2e6bf1a..45c2c4c6 100644
--- a/completions/hping2
+++ b/completions/hping2
@@ -1,13 +1,9 @@
-# bash completion for hping2
+# bash completion for hping2 -*- shell-script -*-
-have hping || have hping2 || have hping3 &&
_hping2()
{
- local cur prev
-
- COMPREPLY=()
- cur=`_get_cword`
- prev=`_get_pword`
+ local cur prev words cword
+ _init_completion || return
case $prev in
-I|--interface)
@@ -29,27 +25,11 @@ _hping2()
esac
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '--help --version --count --interval --fast \
- --faster --numeric --quiet --interface --verbose --debug --bind \
- --unbind --rawip --icmp --upd --scan --listen --spoof \
- --rand-source --rand-dest --ttl --id --ipproto --winid -rel --frag \
- --morefrag --dontfrag --fragoff --mtu --tos --rroute --icmptype \
- --icmpcode --icmp-ipver --icmp-iphlen --icmp-iplen --icmp-ipid \
- --icmp-ipproto --icmp-cksum --icmp-ts --icmp-addr --baseport \
- --destport --keep --win --tcpoff --tcpseq --tcpack --seqnum \
- --badcksum --tcp-timestamp --fin --syn --rst --push --ack --urg \
- --xmas --ymas --data --file --sign --dump --print --safe --end \
- --traceroute --tr-keep-ttl --tr-stop --tr-no-rtt' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
} &&
complete -F _hping2 hping hping2 hping3
-# Local variables:
-# mode: shell-script
-# sh-basic-offset: 4
-# sh-indent-comment: t
-# indent-tabs-mode: nil
-# End:
# ex: ts=4 sw=4 et filetype=sh