Zsh Mailing List Archive
Messages sorted by:
Re: [zsh 4.0.1 bug] filename completion
- X-seq: zsh-users 3944
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Mailing-list zsh-users <zsh-users@xxxxxxxxxxxxxx>
- Subject: Re: [zsh 4.0.1 bug] filename completion
- Date: Tue, 26 Jun 2001 05:15:01 +0000
- In-reply-to: <4a9061759cvincent@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <4a9061759cvincent@xxxxxxxxxx>
On Jun 26, 1:01am, Vincent Lefevre wrote:
} Subject: [zsh 4.0.1 bug] filename completion
} scripts/ share/ software/ sparc-solaris/ src/
} When I type "cd so", "cd sof", "cd softw", "cd softwa"... and try
} to complete, I get "cd software/". But when I type "cd soft" and
} try to complete, nothing happens. Note that here, soft is a named
} directory, but the above behaviour should be incorrect.
It took me a while to figure out which "above behavior" you meant.
The situation seems to be that you have CDABLE_VARS set and `soft' is
the name of the variable.
Either the handling of named directories by _cd is broken, or the
handling of named directories by _path_files is; I'm not sure which,
and it may even be both.
_cd doesn't even try to complete other directories if the prefix is the
name of a cdable variable, which is arguably wrong.
But even so, after _cd sets PREFIX="~$PREFIX" and calls _path_files, the
completion gets botched somehow ... _path_files calls (eventually the
equivalent of, at line 326)
tmp1=( ~soft/ )
compfiles -p tmp1 accex '' '' fake '*(-/)'
The trouble there seems to be that compfiles tries to match ~soft/*(-/) to
~soft and (obviously) fails. The slash is getting added at line 254 of
_path_files; my guess is that needs to become conditional on whether the
prefix originally contained a slash, but that means in turn that the test
on line 255 has to change, etc.
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
Bart Schaefer Brass Lantern Enterprises
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: