summaryrefslogtreecommitdiff
path: root/completions/killall
blob: 8d05d132edfaa1e62969a8ce75a9364e585406b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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
[[ $OSTYPE == *@(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