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

Re: Bug in alias expansion



On Sun, 15 Nov 2015 14:48:05 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Nov 15,  8:03pm, Peter Stephenson wrote:
> }
> } I don't know why this works in other contexts.
> 
> Addendum:  To some extent it does not.
> 
> torch% alias foo='echo x)$(:'
> torch% print $(foo)
> zsh: command not found: fooecho

This is a completely different problem again.  There appear to be three
different but interacting issues:

- this one, which could be hairy as we emerge from parsing a $(...)
expansion with an alias unpopped --- I'm not sure yet if that's
tractable without making the code yet more unreadable

- the fact that parse_subscript() made invalid assumptions about what
was going underneath it, now fixed, at least to the point where it's
no worse than it ever was

- where alias expansion takes place, which would presumably be sensible
to define properly but which I haven't yet worked up an interest in.

pws



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