* Another multicomp nit
@ 1998-08-20 18:46 Bart Schaefer
1998-08-21 8:02 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 1998-08-20 18:46 UTC (permalink / raw)
To: zsh-workers
This bit of code:
if [[ -n "$pref" && -z $sofar[2] && -d "${sofar}$head" ]]; then
# Exactly matched directory: don't try to glob
reply=("${sofar}$head")
Is obviously supposed to implement this behavior:
# Note that exactly matched directories are not expanded, e.g.
# s/zsh-2.4/s<TAB> will not expand to src/zsh-2.4old/src.
There seem to be an extremely limited number of cases where this applies.
For example,
zagzig% ls /u/s/l/z/zsh-3.1.4/s<TAB>
produces
zagzig% ls /usr/src/local/zsh/zsh-3.1.4-build/Src
/usr/src/local/zsh/zsh-3.1.4-build/Src
/usr/src/local/zsh/zsh-3.1.4-build/stamp-h.in
/usr/src/local/zsh/zsh-3.1.4-orig/Src
/usr/src/local/zsh/zsh-3.1.4-orig/StartupFiles
/usr/src/local/zsh/zsh-3.1.4-orig/stamp-h.in
/usr/src/local/zsh/zsh-3.1.4/Src
/usr/src/local/zsh/zsh-3.1.4/StartupFiles
Clearly, it expanded zsh-3.1.4, even though that's an exactly matched
directory. The reason it doesn't work seems to be that, one level up,
/usr/src/local/zip also matches /u/s/l/z/. See:
zagzig% ls /u/s/l/zsh/zsh-3.1.4/s<TAB>
produces
zagzig% ls /usr/src/local/zsh/zsh-3.1.4/Src
/usr/src/local/zsh/zsh-3.1.4/Src
/usr/src/local/zsh/zsh-3.1.4/StartupFiles
Is the exact-match test even worthwhile?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Another multicomp nit
1998-08-20 18:46 Another multicomp nit Bart Schaefer
@ 1998-08-21 8:02 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 1998-08-21 8:02 UTC (permalink / raw)
To: Zsh hackers list
"Bart Schaefer" wrote:
> Is the exact-match test even worthwhile?
I've just looked at my current version of multicomp and I've commented
it out, so the answer is very likely `no'.
--
Peter Stephenson <pws@ifh.de> Tel: +39 50 844536
WWW: http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-08-21 8:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-20 18:46 Another multicomp nit Bart Schaefer
1998-08-21 8:02 ` 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).