Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: potential regression on .. completion on FreeBSD a least
- X-seq: zsh-workers 26074
- From: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: potential regression on .. completion on FreeBSD a least
- Date: Thu, 20 Nov 2008 16:11:13 +0000
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <081119092357.ZM22573@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <20081119113430.GE45607@xxxxxxxxxxx> <20081119164600.67908032@xxxxxxxxxxxx> <081119092357.ZM22573@xxxxxxxxxxxxxxxxxxxxxx>
On Wed, 19 Nov 2008 09:23:56 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On linux, I get this:
>
> schaefer<501> cd ..
> Completing directory in cdpath
> .gimp-2.0/ .gstreamer-0.8/ zsh-3.0.5/ zsh-3.0.8-pre/
> .rhopenoffice1.1/ .emacs.d/ zsh-3.1.6/
>
> (The cursor backs up to be located between the two dots.)
>
> In _path_files, it appears that the change from
>
> # `clever' filing systems where names pop into existence
> # when referenced.
> if (( ! $#tmp1 )); then
>
> to
>
> # we only do this once for completion of each path segment.
> if (( ! $#tmp1 && npathcheck == 0 )); then
>
> is causing the existence check
>
> if [[ -e "$tmp3${(Q)PREFIX}${(Q)SUFFIX}" ]] then
>
> to be skipped. Therefore ".." is never added as a possible completion.
> It appears we may need another special case.
Thanks for looking.
The correct fix is
zstyle ':completion:*' special-dirs true
else the completion system is correct to ignore ".." as a completion.
The previous behaviour was a bug---as you pointed out before, we were
ignoring the result of compfiles and completing files that existed even if
they didn't fulfill the match conditions we were carefully constructing.
The special-dirs behaviour is documented in zshcompsys. The confusion
is my fault for not realising before that we needed to be more careful
with matching files.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author