3

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.)

2
  • 2
    Reproduced on zsh 5.1.1 (x86_64-debian-linux-gnu). Looks like a plain old-fashioned bug to me. Some error in a string length computation. Commented Nov 13, 2015 at 0:22
  • @Gilles: thanks. I just sent a bug report to the zsh-workers list.
    – kjo
    Commented Nov 13, 2015 at 18:04

1 Answer 1

1

That was a bug (regression).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .