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

Re: PATCH: Re: Seg fault in matcher-list matching



I wrote:

> Bart Schaefer wrote:
> 
> > I did this:
> > 
> > zagzig[41] /u/s/l/z/z4/s/zsh
> >                      ^cursor over the 4, press TAB
> > 
> > The path this was intended to match was /usr/src/local/zsh/zsh-2.4/src/zsh.
> > I had first tried TAB at the end of the line and gotten a feep, in case
> > that matters.
> 
> I couldn't get it to seg-fault, but there was something broken. Matching 
> of the suffix, for example, and that both in C and shell code.

Small followup... let's try to do that as seldom as possible.

Bye
 Sven

Index: Completion/Core/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_path_files,v
retrieving revision 1.12
diff -u -r1.12 _path_files
--- Completion/Core/_path_files	2000/05/15 09:34:12	1.12
+++ Completion/Core/_path_files	2000/05/15 10:41:52
@@ -529,7 +529,7 @@
       cpre="${cpre}${tpre%%/*}/"
       tpre="${tpre#*/}"
     elif [[ "$tsuf" = */* ]]; then
-      mid="$testpath"
+      [[ "$tsuf" != /* ]] && mid="$testpath"
       cpre="${cpre}${tpre}/"
       tpre="${tsuf#*/}"
       tsuf=

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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