# ngrep(8) completion -*- shell-script -*- proc _ngrep { local cur prev words cword _init_completion || return match $prev { with -h|-V|-n|-A|-s|-S|-c|-P return with -I|-O _filedir pcap return with -d _available_interfaces -a return with -W setglobal COMPREPLY = ''( $( compgen -W 'normal byline single none' -- "$cur" ) ) return with -F _filedir return } if [[ "$cur" == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) ) return } } && complete -F _ngrep ngrep # ex: ts=4 sw=4 et filetype=sh