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

PATCH: Re: Completion for kill



Oliver Kiddle wrote:

> --- Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > Ahem.  Sorry (I use jobs so seldom that I didn't see that...)
> 
> > -elif [[ "$PREFIX$SUFFIX" = [0-9]# ]]; then
> > +elif [[ "$PREFIX$SUFFIX" = (%*|[0-9]#) ]]; then
> 
> Thanks. The same situation happens with signals so that change needs to
> use [%-] instead of %. I didn't mention the signals because I rarely
> complete them.

Ah, right.

> I find it mildly concerning that _pids needs to know about the
> situation it is called in here. If in the future, it is used somewhere
> else where the other matches don't start with something simple like %
> or -, I can't see that it could know. I see that it works in _gdb but
> only because _gdb calls _pids with a -m option. I suppose we can worry
> about this if and when it becomes an issue.

Yes.  I don't have an idea for that yet.


There's also a hunk fixing a typo in the docs (thanks to Mario).

Bye
 Sven

Index: Completion/Builtins/_pids
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_pids,v
retrieving revision 1.10
diff -u -r1.10 _pids
--- Completion/Builtins/_pids	2001/03/23 15:18:48	1.10
+++ Completion/Builtins/_pids	2001/03/26 08:25:22
@@ -11,7 +11,7 @@
   all=()
   match="*[[:blank:]]${PREFIX}[0-9]#${SUFFIX}[[:blank:]]*[/[:blank:]]${2}*"
   shift 2
-elif [[ "$PREFIX$SUFFIX" = (%*|[0-9]#) ]]; then
+elif [[ "$PREFIX$SUFFIX" = ([%-]*|[0-9]#) ]]; then
   all=()
   match="*[[:blank:]]${PREFIX}[0-9]#${SUFFIX}[[:blank:]]*"
 else
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.110
diff -u -r1.110 compsys.yo
--- Doc/Zsh/compsys.yo	2001/03/23 12:52:39	1.110
+++ Doc/Zsh/compsys.yo	2001/03/26 08:25:25
@@ -2300,7 +2300,7 @@
 the same as the value of the tt(max-errors) style, all in one string.
 
 Note that this completer (and the tt(_correct) completer mentioned
-below) can be quite expansive to call, especially when a large number
+below) can be quite expensive to call, especially when a large number
 of errors is allowed.  One way to avoid this is to set up the
 tt(completer) style using the tt(-e) option to zstyle so that some
 completers are only used when completion is attempted a second time on 

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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