# killall(1) completion -*- shell-script -*- [[ $OSTYPE == *@(linux|freebsd|darwin)* ]] || return 1 proc _killall { var cur = '', prev = '', words = '', cword = '', split = '' _init_completion -s || return match $prev { with -Z|--context|-o|--older-than|-y|--younger-than|-V|--version return with -s|--signal _signals return with -u|--user _allowed_users return } $split && return if [[ $cur == -* ]] { setglobal COMPREPLY = '( '$( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) [[ $cword -eq 1 ]] && _signals - return } _pnames } && complete -F _killall killall # ex: ts=4 sw=4 et filetype=sh