diff options
author | Oliver Kiddle <opk@zsh.org> | 2014-08-13 16:52:36 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2014-08-13 17:00:03 +0200 |
commit | e0966c819c2dcd9d5dbada5588220219d15ee7ec (patch) | |
tree | 7789e2f2bd544fb6594846c5a63aded80facd7ae /Completion/Zsh/Command | |
parent | 2af8b0e2a7b8720d6e0d678d3e186f30c891e2a9 (diff) | |
download | zsh-e0966c819c2dcd9d5dbada5588220219d15ee7ec.tar.gz zsh-e0966c819c2dcd9d5dbada5588220219d15ee7ec.tar.xz zsh-e0966c819c2dcd9d5dbada5588220219d15ee7ec.zip |
32925: complete process groups, partly as a way to suppress insertion of ambiguous PID prefix
Diffstat (limited to 'Completion/Zsh/Command')
-rw-r--r-- | Completion/Zsh/Command/_kill | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/Zsh/Command/_kill b/Completion/Zsh/Command/_kill index 5e52a99de..b9dfde3f0 100644 --- a/Completion/Zsh/Command/_kill +++ b/Completion/Zsh/Command/_kill @@ -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 |