26 lines
505 B
Bash

# killall(1) (Linux, FreeBSD and Darwin) and pkill(1) completion.
_killall()
{
local cur prev words cword
_init_completion || return
if [[ $cword -eq 1 && "$cur" == -* ]]; then
_signals
else
_pnames
fi
return 0
} &&
complete -F _killall pkill
[[ $UNAME == @(Linux|FreeBSD|Darwin) ]] && complete -F _killall killall
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh