Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: cd && cdable_vars (bug?)



» On Wed, Mar 29, 2006 at 10:09AM -0800, Bart Schaefer wrote:

> }    Which AFAIK should not happen, since there is a directory "5", so
> }    there should be no cdablevar lookup, right?
>
> That's probably true, but it may depend on your other completion settings.
> Completion usually errs on the side of giving you too many choices, when
> there is ambiguity.

No, there is no ambiguity (cdablevars should only work when there is no
dir with that name) and, in any case, these choices are spurious in the
sense that, if accepted and executed, they fail (just like cd <int>
won't expand to cd ~<int>).

This will happen with clean "completion styles"

zsh -f

autoload -U compinit
compinit -D -C

setopt cdable_vars

mkdir -p test_cd
cd test_cd

dirstack=(/etc /usr /var)

mkdir -p 2/a 2/b 2/c

loki% cd 2/[TAB]
a/           c/           games/       lib/         lost+found/  share/
b/           dict@        include/     lib64/       openwin@     src/

loki% cd 2/bin
cd: no such file or directory: 2/bin

Cheers,
Francisco



Messages sorted by: Reverse Date, Date, Thread, Author