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

Re: Bug in alias expansion



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 should of course expand to

    print $( echo x)$(: )

which is perfectly valid and definitely should not produce "fooecho",
so the backtracking is still messed up somewhere and parse_subscript()
is potentially a red herring.

In older versions of zsh it gagged in a different way:

% alias -g foo='echo x)$(:' 
% print $(foo)
zsh: parse error near `)'
zsh: parse error in command substitution



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