# pwdx(1) completion -*- shell-script -*- proc _pwdx { local cur prev words cword _init_completion || return match $prev { with -h|--help|-V|--version return } if [[ $cur == -* ]] { local help='$( _parse_help "$1" )' [[ $help ]] || setglobal help = '-V' setglobal COMPREPLY = ''( $( compgen -W "$help" -- "$cur" ) ) } else { _pids } } && complete -F _pwdx pwdx # ex: ts=4 sw=4 et filetype=sh