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

Non-intuitive completion

I've not tested this against Peter Stephenson's patched 3.1.5, only
stock release.  And I'm lost as to what's changed in the new stuff.
Also, this isn't necessarily a bug, as it's 'daft' on my part.  But the
results are counter-intuitive, to me at least.

longprompt% zsh-3.1.5 -f
athenaeum% compctl -L print
compctl: no compctl defined for print
athenaeum% print $ZSH_*<TAB>

At which point the leading $ZSH_ is completely ignored and removed, and
the * is expanded out to files in the current directory, as per usual.

Nothing special about the above choice of variable, except that <TAB>
after the Z provides the next three characters.  I'm lazy and wanted
both, so tried '*' to see what zsh would do.  I /know/ it's a filename
glob, but shouldn't the leading text have some effect instead of being
treated as null?

athenaeum% print $ZSH_VERSION*<TAB>
beeps whilst
athenaeum% print $ZSH_VERSIO*<TAB>
loses everything before the *.

It looks as though expansion of wibble* doesn't account for wibble being
a 'variable' with null value.  Evidence:
athenaeum% FOO=
athenaeum% print $FOO*<TAB>
produces the file list.  If FOO has a non-null value, it doesn't.

Is this comprehensive enough?
--> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?

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