# pidof(8) completion -*- shell-script -*- proc _pidof { local cur prev words cword _init_completion || return case (prev) { -h|--help|-V|--version { return } -o|--omit-pid { _pids return } } if [[ $cur == -* ]] { setvar COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) return } _pnames } && complete -F _pidof pidof # ex: ts=4 sw=4 et filetype=sh