diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2001-11-06 15:06:59 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2001-11-06 15:06:59 +0000 |
commit | d39feeffc48330e4b16768f881306b75e7673971 (patch) | |
tree | 4a950e123288fdfa52283c79c048c2949eed228d /Completion/Zsh/Command/_kill | |
parent | 42f096be3422e46695798a01c7571bf0515ef1d6 (diff) | |
download | zsh-d39feeffc48330e4b16768f881306b75e7673971.tar.gz zsh-d39feeffc48330e4b16768f881306b75e7673971.tar.xz zsh-d39feeffc48330e4b16768f881306b75e7673971.zip |
16224: add -n option to kill and complete options from _kill
Diffstat (limited to 'Completion/Zsh/Command/_kill')
-rw-r--r-- | Completion/Zsh/Command/_kill | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Completion/Zsh/Command/_kill b/Completion/Zsh/Command/_kill index 5e3caed6a..8887be5fc 100644 --- a/Completion/Zsh/Command/_kill +++ b/Completion/Zsh/Command/_kill @@ -1,6 +1,18 @@ #compdef kill -_alternative \ - 'signals:: _signals -p' \ +local curcontext="$curcontext" line state ret=1 + +_arguments -C \ + '(-s -l 1)-n[specify signal number]:signal number' \ + '(-n -l 1)-s[specify signal name]:signal:_signals' \ + '(-n -s)-l[list signal names or numbers of specified signals]:*:signal:_signals' \ + '(-n -s -l)1::signal:_signals -p' \ + '*:processes:->processes' && ret=0 + +if [[ -n "$state" && -prefix [%0-9]# ]]; then + _alternative \ 'processes:: _pids' \ - 'jobs:: _jobs -t' + 'jobs:: _jobs -t' && ret=0 +fi + +return ret |