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

Re: expansion of environment variables

Bart Schaefer wrote:
> [>workers]
> On Mar 5,  5:46pm, Peter Stephenson wrote:
> }
> } You're right, I missed that last step, there is indeed stuff in tmp1
> } including the correct completion.
> I've been staring at this and I've concluded (possibly wrongly) that
> even the stuff in tmp1 is a bit of a red herring.
> Correct me, but isn't the real problem that the string on the line
> still looks like "$key." but all of the possible matches look like
> "2345.xml"?

Yep, I'd eventually come to that conclusion.  I think compfiles is
generating files without doing any matching at this stage (I think it
would do clever stuff with globbing if requested for limiting the
matches, but that's not the case here), so we get a complete list of
files that may or may not match the command line.  Then the compadd -D
is doing the matching, and that's where it all falls over for the reason
you say.  We'd need at the least to massage or hide the $PREFIX/$SUFFIX
seen by that second step, or equivalent sneaky trick.

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