about summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
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