about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Builtins/_pids8
-rw-r--r--Completion/User/_killall9
2 files changed, 10 insertions, 7 deletions
diff --git a/Completion/Builtins/_pids b/Completion/Builtins/_pids
index 1d02f5530..d3cf8a68e 100644
--- a/Completion/Builtins/_pids
+++ b/Completion/Builtins/_pids
@@ -12,17 +12,17 @@ if [[ "$1" = -m ]]; then
   shift 2
 fi
 
-zstyle -s ":completion:${curcontext}:pids" command args
+zstyle -s ":completion:${curcontext}:processes" command args
 
-out="$(_call pids ps 2>/dev/null)"
+out="$(_call processes ps 2>/dev/null)"
 
 if zstyle -T ":completion:${curcontext}:processes" verbose; then
-  zstyle -s ":completion:${curcontext}:pids-list" command listargs
+  zstyle -s ":completion:${curcontext}:processes-list" command listargs
   (( $#listargs )) || listargs=( "$args[@]" )
   if [[ "$listargs" = "$args" ]]; then
     list=("${(@Mr:COLUMNS-1:)${(f@)out}[2,-1]:#[ 	]#${PREFIX}[0-9]#${SUFFIX}[ 	]*${~match}}")
   else
-    list=("${(@Mr:COLUMNS-1:)${(f@)$(_call pids-list ps 2>/dev/null)}[2,-1]:#[ 	]#${PREFIX}[0-9]#${SUFFIX}[ 	]*${~match}}")
+    list=("${(@Mr:COLUMNS-1:)${(f@)$(_call processes-list ps 2>/dev/null)}[2,-1]:#[ 	]#${PREFIX}[0-9]#${SUFFIX}[ 	]*${~match}}")
   fi
   desc=(-ld list)
 else
diff --git a/Completion/User/_killall b/Completion/User/_killall
index 5df1acbb9..b5ec90c8b 100644
--- a/Completion/User/_killall
+++ b/Completion/User/_killall
@@ -1,6 +1,9 @@
 #compdef killall
 
-if compset -P 1 -; then
-  _description expl signal
-  compadd "$expl[@]" $signals[1,-3]
+if [[ "$OSTYPE" = linux* ]]; then
+  _alternative \
+      'signals:: _signals -p' \
+      'processes:process:{ compadd "$expl[@]" ${$(_call processes-names ps ho comm 2> /dev/null):#(ps|COMMAND)} }'
+else
+  _signals -p
 fi