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

RE: [zsh 4.0.1 bug] filename completion



>
> On 26 Jun, Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx> wrote:
> > 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:
>
> But in my case, where soft is a named directory and software is a normal
> directory in the cwd, soft shouldn't be seen as an exact match.
>

It is. It makes no difference if one is named directory and other a file as
long as 'cd soft' works. And 'soft' *is* exact match for 'soft'.

> And what do you call an exact match?

It was incorrect term here, you are right. More correct would be "exact
prefix match" ... which is probably even more confusing :-) If one matching
word was exact prefix of others, the other ones were not considered.

                                                 I don't understand your
example.
> I would agree if you had typed "/u/lib/n". But I don't see why lib
> should be priviledged. Because it is shorter than lib64s? But I don't
> think this is a good idea.

Erm ... my example was meant for Sven and he got it right :-))) Anyway, my
point was exactly as yours - lib should not be preferred in this context,
but it was, and it was a bug. And it was the reason for a problem you
reported. Sven's patch fixed it and I hope it will be included in 4.0.2.

-andrej



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