[Pkg-zsh-devel] Bug#613162: zsh: Loading colors script fails, bad set of key/value pairs

Frank Terbeck ft at bewatermyfriend.org
Sun Feb 13 13:03:52 UTC 2011


Benjamin Peter wrote:
> $ autoload -U colors
> $ colors
> colors:89: bad set of key/value pairs for associative array
>
> Commenting out the following line helps:
>
> /usr/share/zsh/functions/Misc/colors
>  89 colour=(${(kv)color}) # A case where ksh namerefs would be useful ...
>
> Any idea why this fails?

That should only happen if ${#color} is an odd number, which for an
associative array, shouldn't be possible. So, after running your "fixed"
function, do this:

% print ${(t)color}
% print ${#color}

The first command should print `association', the second should print
an *even* number (`76' for me). Also, a trace might be helpful:

% (set -x; colors;) 2>&1 | cat -v

Regards, Frank





More information about the Pkg-zsh-devel mailing list