about summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-11-06 15:06:59 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-11-06 15:06:59 +0000
commitd39feeffc48330e4b16768f881306b75e7673971 (patch)
tree4a950e123288fdfa52283c79c048c2949eed228d /Completion/Zsh
parent42f096be3422e46695798a01c7571bf0515ef1d6 (diff)
downloadzsh-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')
-rw-r--r--Completion/Zsh/Command/_jobs_builtin2
-rw-r--r--Completion/Zsh/Command/_kill18
2 files changed, 16 insertions, 4 deletions
diff --git a/Completion/Zsh/Command/_jobs_builtin b/Completion/Zsh/Command/_jobs_builtin
index 39ddb8a45..70804cf0f 100644
--- a/Completion/Zsh/Command/_jobs_builtin
+++ b/Completion/Zsh/Command/_jobs_builtin
@@ -2,7 +2,7 @@
 
 _arguments -C -s \
   "(-d -l -p -r -s *)-Z[specify string to replace shell's argument and environment with]:string" \
-  '(-Z)-d[show directory from which to job was started]' \
+  '(-Z)-d[show directory from which each job was started]' \
   '(-Z)-l[list process IDs]' \
   '(-Z)-p[list process groups]' \
   '(-Z -s)-r[list only running jobs]' \
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