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

Re: expansion of environment variables

Bart Schaefer wrote:
> The call to "compfiles -p" at line 418 is what fills in tmp1.  It DOES
> find matching files, because at line 466 we save tmp1 in tmp2 and at
> that point tmp1 is the expanded list.  Then at 467 we call compadd -D
> passing only the tails of what was expanded in commpfiles, and compadd
> empties tmp1 again.

You're right, I missed that last step, there is indeed stuff in tmp1
including the correct completion.

> So I suspect this is more of the same foolishness that forced us to add
> $Uopt a bit ago, but manifesting in a different way.  Or maybe we need
> to pass some prefix options to compadd at that point?

It may even have briefly worked when -U was passed to all relevant
compadds in _path_files, but we've now restricted it to approximation.
I can't remember why, but I seem to remember it was something which
should in principle have worked but no one understood what the internals
were doing.

Something clever with prefixes might fix it, only I don't know
what.  There are two problems:  first check that something needs
expanding, next do it safely.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

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