Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: pids tag



Weird. _pids was using the tag `pids' instead of `processes' to lookup 
the command style.

I think I thought at that time that I had a reason for that but maybe
that was only my brain geeting weak in a late night hacking session.

Or does anyone see a problem with making it use the `processes' tag?

Bye
 Sven

Index: Completion/Builtins/_pids
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_pids,v
retrieving revision 1.3
diff -u -r1.3 _pids
--- Completion/Builtins/_pids	2000/04/11 07:57:56	1.3
+++ Completion/Builtins/_pids	2000/04/13 10:59:28
@@ -12,17 +12,17 @@
   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
Index: Completion/User/_killall
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_killall,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 _killall
--- Completion/User/_killall	2000/02/28 10:00:28	1.1.1.5
+++ Completion/User/_killall	2000/04/13 10:59:28
@@ -3,7 +3,7 @@
 if [[ "$OSTYPE" = linux* ]]; then
   _alternative \
       'signals:: _signals -p' \
-      'processes:process:{ compadd "$expl[@]" ${$(_call pids ps ho comm 2> /dev/null):#(ps|COMMAND)} }'
+      'processes:process:{ compadd "$expl[@]" ${$(_call processes-names ps ho comm 2> /dev/null):#(ps|COMMAND)} }'
 else
   _signals -p
 fi
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.16
diff -u -r1.16 compsys.yo
--- Doc/Zsh/compsys.yo	2000/04/12 12:35:38	1.16
+++ Doc/Zsh/compsys.yo	2000/04/13 10:59:30
@@ -644,15 +644,6 @@
 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 @@
 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 @@
 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.
 )

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author