From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: Re: [zsh 4.0.1 bug] filename completion
Date: Tue, 26 Jun 2001 10:02:19 +0200 (MET DST) [thread overview]
Message-ID: <200106260802.KAA23650@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: <1010626051501.ZM24562@candle.brasslantern.com>
[ 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@informatik.hu-berlin.de
next parent reply other threads:[~2001-06-26 8:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1010626051501.ZM24562@candle.brasslantern.com>
2001-06-26 8:02 ` Sven Wischnowsky [this message]
2001-06-27 6:26 ` PATCH (?) " Bart Schaefer
2001-06-27 13:11 ` Sven Wischnowsky
2001-06-27 16:20 ` Bart Schaefer
2001-06-28 7:32 ` Sven Wischnowsky
2001-06-27 18:35 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200106260802.KAA23650@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).