summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-13 11:05:15 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-13 11:05:15 +0000
commitb692ed1b9d19d10646d3870bb3b9b301216bddf7 (patch)
tree7f9950bc2b5019a49496bd75f27a86d70c796496
parentf5b6feedcaed6b2cbc7f5dc20a2cc4b401dc62d9 (diff)
downloadzsh-b692ed1b9d19d10646d3870bb3b9b301216bddf7.tar.gz
zsh-b692ed1b9d19d10646d3870bb3b9b301216bddf7.tar.xz
zsh-b692ed1b9d19d10646d3870bb3b9b301216bddf7.zip
remove the `pids' tag, use `processes' instead (10733)
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Builtins/_pids8
-rw-r--r--Completion/User/_killall9
-rw-r--r--Doc/Zsh/compsys.yo23
4 files changed, 25 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 876fb54e2..d65f3b160 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-04-13  Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
 
+	* 10733: Completion/Builtins/_pids, Completion/User/_killall,
+ 	Doc/Zsh/compsys.yo: remove the `pids' tag, use `processes' instead
+	
 	* 10727: Src/builtin.c: make read -[kq] always print the prompt,
  	if any; after all they make sure they have a terminal anyway
 	
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
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 75dc14346..91e5c78e8 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -644,15 +644,6 @@ item(tt(paths))(
 used to look up the values of the tt(expand), tt(ambiguous) and
 tt(special-dirs) styles
 )
-kindex(pids, completion tag)
-item(tt(pids))(
-for process identifiers
-)
-kindex(pids-list, completion tag)
-item(tt(pids-list))(
-used to look up the tt(command) style when generating the list to
-display for process identifiers
-)
 kindex(pods, completion tag)
 item(tt(pods))(
 for perl pods
@@ -673,6 +664,16 @@ kindex(processes, completion tag)
 item(tt(processes))(
 for process identifiers
 )
+kindex(processes-list, completion tag)
+item(tt(processes-list))(
+used to look up the tt(command) style when generating the list to
+display for process identifiers
+)
+kindex(processes-names, completion tag)
+item(tt(processes-names))(
+used to look up the tt(command) style when generating the names of
+processes for tt(killall)
+)
 kindex(sequences, completion tag)
 item(tt(sequences))(
 for sequences (e.g. tt(mh) sequences)
@@ -801,9 +802,9 @@ called, but for completion purposes one needs to ensure that the real
 command is called.
 
 For example, the function generating process IDs as matches uses this
-style with the tt(pids) tag to generate the IDs to complete and iwhen
+style with the tt(processes) tag to generate the IDs to complete and iwhen
 the tt(verbose) style is `true', it uses this style with the
-tt(pids-list) tag to generate the strings to display. When using
+tt(processes-list) tag to generate the strings to display. When using
 different values for these two tags one should ensure that the process
 IDs appear in the same order in both lists.
 )