Identical code works on one system, fails on another:
% zsh --version
zsh 5.0.7 (x86_64-pc-linux-gnu)
% typeset -A frobozz
% alias -g foo='echo xyz'
% frobozz[$(foo)]=9
% echo ${(kv)frobozz}
xyz 9
% zsh --version
zsh 5.1 (i386-unknown-netbsdelf6.1)
% typeset -A frobozz
% alias -g foo='echo xyz'
% frobozz[$(foo)]=9
zsh: not an identifier: frobozz[$(fooech9
I'd like to know how to get this to work on both systems.
It would also be nice to understand what on earth is going on in the failing case.
And as always, any advice on how to debug zsh
scripts is always appreciated. (I find zsh
scripts essentially undebuggable... The example above is an all-too-typical illustration of this.)