about summary refs log tree commit diff
path: root/Completion/Builtins/_kill
blob: 0b0f5c1886b67fe32313c5144c71ddc79f8aeecb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#defcomp 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