about summary refs log tree commit diff
path: root/Completion/Builtins/_kill
blob: 979c87804ca8c8399729986ff1963a176fd1082f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#compdef kill

local list

if compset -P 1 -; then
  compgen -k "($signals[1,-3])"
else
  local ret=1

  compgen -P '%' -j && ret=0
  list=("$(ps 2>/dev/null)")
  compgen -y '$list' -s '`ps 2>/dev/null | tail +2 | cut -c1-5`' && ret=0

  return ret
fi