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

PATCH: Re: Approximate completion



Peter Stephenson wrote:

> Approximate completion seems to be be broken in some non-obvious way.  If I
> try to complete 50dc.z to 50cd.ztst, the right completion appears as an
> argument to compadd, but nothing is inserted.  Correction with ^Xc seems to
> work.  Indeed, completing 50dc.zts works, too: since I have max errors set
> to 2, this suggest that for some reason it isn't matching with a * at the
> end of the test string at some point.

No. I had to make globbing flags be treated specially lately for
functions like _path_files that use hidden prefixes. The code now
takes the flags (if they are at the beginning of $PREFIX) and moves
them after the matched prefix. But I forgot to update the cached
prefix-length after extracting the flags.

Bye
 Sven

diff -u -r oldsrc/Zle/compcore.c Src/Zle/compcore.c
--- oldsrc/Zle/compcore.c	Wed Dec 29 22:26:15 1999
+++ Src/Zle/compcore.c	Mon Jan  3 19:58:57 2000
@@ -1680,6 +1680,7 @@
 			p[1] = sav;
 
 			lpre = p + 1;
+			llpl -= gfl;
 		    }
 		}
 		s = dat->ppre ? dat->ppre : "";

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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