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

Re: Bug in alias expansion



On Fri, Nov 13, 2015 at 8:03 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Nov 13,  1:03pm, Kynn Jones wrote:
> }
> } % typeset -A frobozz
> } % alias -g foo='echo xyz'
> } % frobozz[$(foo)]=9
> } zsh: not an identifier: frobozz[$(fooech9
>
> Confirmed.  This only occurs for assignments in command position:

Thanks for the confirmation.


> ... This only occurs for assignments in command position:

> torch% typeset frobozz[$(foo)]=9
> torch% print ${(kv)frobozz}
> xyz 9
> torch%
>

Unfortunately, the assignment preceded by `typeset` fails under 5.0.7

% alias -g foo='echo xyz'
% typeset frobozz[$(foo)]=9
zsh: no matches found: frobozz[xyz]=9



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