From: Jan Larres <jan@majutsushi.net>
To: zsh-workers@zsh.org
Subject: Re: Directory completion acts as if CHASE_LINKS is set
Date: Fri, 06 Sep 2013 13:42:51 +1200 [thread overview]
Message-ID: <l0bbuk$gqp$1@ger.gmane.org> (raw)
In-Reply-To: <130905083139.ZM29859@torch.brasslantern.com>
On 06/09/13 03:31, Bart Schaefer wrote:
> In any case, this is a problem inherent in the way globbing interprets
> "../" -- filename generation does not obey the same rules as "cd" path
> resolution.
>
> torch% print ../*(/)
> ../bar ../foo
> torch% print $PWD:h/*(/)
> /tmp/cdtest/foo/baz
>
> Completion uses globbing to generate the target file names, so this has
> to be fixed up somehow in _cd before _path_files is called.
>
> This patch is a step in the right direction, but has the side-effect of
> expanding ".." into $PWD:h which is probably not desirable. There may
> be other nuances [particularly with completion in the middle of a word]
> that are not handled. So I'm not going to commit it, just presenting it
> for purposes of discussion.
Thanks, that patch does solve the issue with cd to a certain degree. But
as you said yourself it is not specific to cd – for example, 'ls
../[TAB]' has the same problem. So I assume that patching the individual
command completions is not the best way to go about it, but I'm not
familiar enough with the zsh internals to know what the right way would be.
Jan
next prev parent reply other threads:[~2013-09-06 1:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-05 1:23 Jan Larres
2013-09-05 2:15 ` Jan Larres
2013-09-05 15:31 ` Bart Schaefer
2013-09-06 1:42 ` Jan Larres [this message]
2013-09-06 6:13 ` Bart Schaefer
2013-09-06 6:46 ` Jan Larres
2013-09-06 20:09 ` Peter Stephenson
2013-09-07 5:03 ` Bart Schaefer
2013-09-08 17:51 ` Peter Stephenson
2013-09-08 21:26 ` Bart Schaefer
2013-09-09 9:59 ` Peter Stephenson
2013-09-10 14:26 ` Bart Schaefer
2013-09-10 22:34 ` Jan Larres
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='l0bbuk$gqp$1@ger.gmane.org' \
--to=jan@majutsushi.net \
--cc=zsh-workers@zsh.org \
/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).