2011-12-27 21:52:58 +02:00
|
|
|
# killall(1) completion -*- shell-script -*-
|
|
|
|
|
|
|
|
[[ $OSTYPE == *@(linux|freebsd|darwin)* ]] || return 1
|
2011-10-12 23:01:10 +03:00
|
|
|
|
|
|
|
_killall()
|
|
|
|
{
|
2011-10-26 21:01:18 +03:00
|
|
|
local cur prev words cword split
|
|
|
|
_init_completion -s || return
|
|
|
|
|
|
|
|
case $prev in
|
|
|
|
-Z|--context|-o|--older-than|-y|--younger-than|-V|--version)
|
|
|
|
return
|
|
|
|
;;
|
|
|
|
-s|--signal)
|
2011-12-27 21:52:58 +02:00
|
|
|
_signals
|
2011-10-26 21:01:18 +03:00
|
|
|
return
|
|
|
|
;;
|
|
|
|
-u|--user)
|
|
|
|
_allowed_users
|
|
|
|
return
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
$split && return
|
2011-10-12 23:01:10 +03:00
|
|
|
|
2011-12-27 21:52:58 +02:00
|
|
|
if [[ $cur == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
|
|
|
[[ $cword -eq 1 ]] && _signals -
|
|
|
|
return
|
2011-10-12 23:01:10 +03:00
|
|
|
fi
|
|
|
|
|
2011-12-27 21:52:58 +02:00
|
|
|
_pnames
|
2011-10-12 23:01:10 +03:00
|
|
|
} &&
|
2011-12-27 21:52:58 +02:00
|
|
|
complete -F _killall killall
|
2011-10-12 23:01:10 +03:00
|
|
|
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|