Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [zsh 4.0.1 bug] filename completion
- X-seq: zsh-workers 15086
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: [zsh 4.0.1 bug] filename completion
- Date: Tue, 26 Jun 2001 10:02:19 +0200 (MET DST)
- In-reply-to: <1010626051501.ZM24562@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
[ moved to -workers ]
Bart Schaefer wrote:
> ...
>
> I fooled around with _cd a bit and got something that works, but I'm not
> happy with it, so I'm going to hope that Sven has a better idea of what's
> going on.
I've now fooled around a bit, too, and first couldn't get it to fail,
because I don't have cdpath set.
So my comment is that I don't understand the code in _cd at all. Why do
we test for cdablevars only if `$#cdpath -ne 0'? It works without.
And then the test for when cdablevars should be used: it's obviously
wrong (that's the real reason for the bug). We should complete
parameter names[1] if there is no slash in the word or if we are before the
first slash. Otherwise we could check if there is no directory matching
the string before the first slash but a parameter with that name -- and
only in that case should we trick _path_files into completing a word
with the parameter name replaced by the value of the parameter.
Otherwise completing `soft/f<TAB>' might surprise users who would expect
it to complete to `software/foo'.
Bye
Sven
[1] Or user names. Urgh.
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author