Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: brace expansion not happening
- X-seq: zsh-users 13673
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: brace expansion not happening
- Date: Thu, 8 Jan 2009 15:53:10 +0100
- In-reply-to: <18790.4150.196379.84851@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <18790.4150.196379.84851@xxxxxxxxxxxxxx>
Carlos Carvalho <carlos@xxxxxxxxxxxxxx>:
> 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:
[...]
> Putting in a variable:
>
> % list=a/{b,c}-d
> % for i in $list; do echo $i; done
> a/{b,c}-d
Use an array:
% list=(a/{b,c}-d)
The rest just work, just as you wrote it.
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author