* potential regression on .. completion on FreeBSD a least
@ 2008-11-19 11:34 Baptiste Daroussin
2008-11-19 15:46 ` Pierre-Emmanuel André
0 siblings, 1 reply; 4+ messages in thread
From: Baptiste Daroussin @ 2008-11-19 11:34 UTC (permalink / raw)
To: zsh-workers
Hi,
On zsh 4.3.9 I found a potential regression on .. completion at least on FreeBSD
(not on linux) don't know about others OSes.
When I do ..<tab> or cd ..<tab> it doesn't complete with / as it did before
(until 4.3.6) or as it does on linux.
cd ..<tab> doesn't complete anything,
..<tab> complete with : external command, alias executable file or directory.
I can't find where is the bug, so I can't send any patch.
regards,
Bapt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: potential regression on .. completion on FreeBSD a least
2008-11-19 11:34 potential regression on .. completion on FreeBSD a least Baptiste Daroussin
@ 2008-11-19 15:46 ` Pierre-Emmanuel André
2008-11-19 17:23 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Pierre-Emmanuel André @ 2008-11-19 15:46 UTC (permalink / raw)
To: Baptiste Daroussin; +Cc: zsh-workers
Le Wed, 19 Nov 2008 12:34:31 +0100,
Baptiste Daroussin <baptiste.daroussin@gmail.com> a écrit :
> Hi,
>
> On zsh 4.3.9 I found a potential regression on .. completion at least
> on FreeBSD (not on linux) don't know about others OSes.
>
> When I do ..<tab> or cd ..<tab> it doesn't complete with / as it did
> before (until 4.3.6) or as it does on linux.
> cd ..<tab> doesn't complete anything,
> ..<tab> complete with : external command, alias executable file or
> directory.
>
> I can't find where is the bug, so I can't send any patch.
>
Hi,
Same on OpenBSD.
% .<tab> : completion works
% ..<tab> : no completion (but no error)
% ../<tab> : completion works
Regards,
--
Pierre-Emmanuel André <pea at raveland.org>
GPG key: 0x7AE329DC
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: potential regression on .. completion on FreeBSD a least
2008-11-19 15:46 ` Pierre-Emmanuel André
@ 2008-11-19 17:23 ` Bart Schaefer
2008-11-20 16:11 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2008-11-19 17:23 UTC (permalink / raw)
To: zsh-workers
On Nov 19, 4:46pm, Pierre-Emmanuel wrote:
} Subject: Re: potential regression on .. completion on FreeBSD a least
}
} Le Wed, 19 Nov 2008 12:34:31 +0100,
} Baptiste Daroussin <baptiste.daroussin@gmail.com> a écrit :
}
} > When I do ..<tab> or cd ..<tab> it doesn't complete with / as it did
} > before (until 4.3.6) or as it does on linux.
} > cd ..<tab> doesn't complete anything,
} > ..<tab> complete with : external command, alias executable file or
} > directory.
} >
} > I can't find where is the bug, so I can't send any patch.
}
} Same on OpenBSD.
}
} % .<tab> : completion works
} % ..<tab> : no completion (but no error)
} % ../<tab> : completion works
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: potential regression on .. completion on FreeBSD a least
2008-11-19 17:23 ` Bart Schaefer
@ 2008-11-20 16:11 ` Peter Stephenson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2008-11-20 16:11 UTC (permalink / raw)
Cc: zsh-workers
On Wed, 19 Nov 2008 09:23:56 -0800
Bart Schaefer <schaefer@brasslantern.com> 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@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-20 16:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-19 11:34 potential regression on .. completion on FreeBSD a least Baptiste Daroussin
2008-11-19 15:46 ` Pierre-Emmanuel André
2008-11-19 17:23 ` Bart Schaefer
2008-11-20 16:11 ` Peter Stephenson
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).