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

brace expansion not happening



Hi list,

I need to do an expansion in more than one place, so I'd like to put
the pattern in a variable. However it's not equivalent:

% for i in a/{b,c}-d; do echo $i; done                                         
a/b-d
a/c-d
%

Putting in a variable:

% list=a/{b,c}-d
%  for i in $list; do echo $i; done
a/{b,c}-d
%

I also tried ${~=list} to no avail. It seems that only brace expansion
isn't done.

How can I get the full expansion using a variable? This case is for
interactive use.



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