Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Array expansion interacts with brace expansion in the wrong order
- X-seq: zsh-workers 41423
- From: Anders Kaseorg <andersk@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Array expansion interacts with brace expansion in the wrong order
- Date: Thu, 13 Jul 2017 18:45:09 -0400 (EDT)
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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