mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
32925: complete process groups, partly as a way to suppress insertion of ambiguous PID prefix
This commit is contained in:
parent
2af8b0e2a7
commit
e0966c819c
2 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2014-08-13 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 32925: Completion/Zsh/Command/_kill: complete process groups,
|
||||
partly as a way to suppress insertion of ambiguous PID prefix
|
||||
|
||||
* 32893: Completion/Unix/Type/_pids: move use of _call_program
|
||||
inside the _tags loop to allow processes to be separated
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#compdef kill
|
||||
|
||||
local curcontext="$curcontext" line state ret=1
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
'(-s -l 1)-n[specify signal number]:signal number' \
|
||||
|
@ -10,9 +11,12 @@ _arguments -C \
|
|||
'*:processes:->processes' && ret=0
|
||||
|
||||
if [[ -n "$state" ]]; then
|
||||
local pgrp='process-groups:: _wanted '
|
||||
[[ -n "$opt_args[(i)-[ns]]${${(@)line:#--}}" && -prefix - ]] && pgrp+='-x '
|
||||
pgrp+="process-groups expl 'process-group' compadd - 0"
|
||||
_alternative \
|
||||
'processes:: _pids' \
|
||||
'jobs:: _jobs -t' && ret=0
|
||||
'jobs:: _jobs -t' $pgrp && ret=0
|
||||
fi
|
||||
|
||||
return ret
|
||||
|
|
Loading…
Reference in a new issue