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

Re: RE: [zsh 4.0.1 bug] filename completion



Andrej Borsenkow wrote:

> >
> > _cd doesn't even try to complete other directories if the prefix is the
> > name of a cdable variable, which is arguably wrong.
> >
> 
> I suspect it is part of more general problem. I have a feeling that handling
> of exact match changed at some point near 4.0.1 release. Now zsh will prefer
> exact match in any context while before I got menu selection ... and I am
> sure none of my styles changed.
> 
> E.g. I have /usr/lib{,64s}/netlib. Attempt to complete /u/l/n always
> completes /usr/lib/netlib. Styles are:

Oops.  You are right, that test in `compfiles -r' was too stupid (its
the test used in the loop that finds the first ambiguous component and
it didn't add a slash when comparin in-path components, so it thought
`lib' was the same as `lib64s' in this case).

And yes, this also makes it offer both `soft' and `software' in that
other case.

I'm still not overly happy with the code in _cd, though.

This should go into 4.0.2, too, I think.


Bye
  Sven

Index: Src/Zle/computil.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v
retrieving revision 1.61
diff -u -r1.61 computil.c
--- Src/Zle/computil.c	2001/06/19 15:46:54	1.61
+++ Src/Zle/computil.c	2001/06/26 09:02:09
@@ -3719,6 +3719,8 @@
 		if ((q = strchr((p = dupstring(p)), '/')))
 		    *q = '\0';
 
+                p = dyncat(p, "/");
+
 		for (; *names; names++)
 		    if (!strpfx(p, *names)) {
 			*amb = 1;

-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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