1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#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 '${${${(f)"$(ps 2>/dev/null)"}[2,-1]## #}%% *}' && ret=0 return ret fi