blob: 25cddbadc3318f41617888cab603386570851ffb (
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
26
27
28
29
|
# kill(1) completion -*- shell-script -*-
_kill()
{
local cur prev words cword
_init_completion || return
case $prev in
-s)
_signals
return
;;
-l)
return
;;
esac
if [[ $cword -eq 1 && $cur == -* ]]; then
# return list of available signals
_signals -
COMPREPLY+=($(compgen -W "-s -l" -- "$cur"))
else
# return list of available PIDs
_pids
fi
} &&
complete -F _kill kill
# ex: filetype=sh
|