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

Array expansion interacts with brace expansion in the wrong order



Given a=(1 2 3), I would expect {$^a,4,5,6} to expand to 1 2 3 4 5 6, but 
it doesn’t.  Instead the 4 5 6 is duplicated for every element of $^a:

% echo $ZSH_PATCHLEVEL
zsh-5.3.1-240-ga3b3f0057
% echo {{1,2,3},4,5,6}
1 2 3 4 5 6
% a=(1 2 3)
% echo {$^a,4,5,6}
1 4 5 6 2 4 5 6 3 4 5 6

Anders



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