48 lines
1.0 KiB
Plaintext
Raw Normal View History

# bash completion for tcpdump -*- shell-script -*-
2009-05-27 18:58:31 +02:00
_tcpdump()
{
local cur prev words cword
_init_completion || return
2009-05-27 18:58:31 +02:00
case $prev in
-r|-w|-F)
2009-10-04 19:42:50 +02:00
_filedir
return 0
;;
-i)
_available_interfaces -a
return 0
;;
-m)
_filedir mib
return 0
;;
-T)
COMPREPLY=( $( compgen -W 'aodv cnfp rpc rtp rtcp snmp tftp vat
wb' -- "$cur" ) )
return 0
;;
-z)
compopt -o filenames
COMPREPLY=( $( compgen -c -- "$cur" ) )
return 0
;;
-Z)
_allowed_users
return 0
;;
-B|-c|-C|-D|-E|-G|-M|-s|-W|-y)
return 0
;;
2009-10-04 19:42:50 +02:00
esac
2009-05-27 18:58:31 +02:00
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
2009-10-04 19:42:50 +02:00
fi
2009-05-27 18:58:31 +02:00
} &&
complete -F _tcpdump tcpdump
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh