Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: brace expansion not happening
- X-seq: zsh-users 13677
- From: carlos@xxxxxxxxxxxxxx (Carlos Carvalho)
- To: zsh-users@xxxxxxxxxx
- Subject: Re: brace expansion not happening
- Date: Thu, 8 Jan 2009 16:02:30 -0200
- In-reply-to: <alpine.LNX.2.00.0901081131430.10127@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <18790.4150.196379.84851@xxxxxxxxxxxxxx> <20090108145310.GA19764@xxxxxxxxxxxxxxx> <alpine.LNX.2.00.0901081131430.10127@xxxxxxxxxxxxxxx>
Benjamin R. Haskell (zsh@xxxxxxxxxx) wrote on 8 January 2009 11:34:
>On Thu, 8 Jan 2009, Frank Terbeck wrote:
>
>> 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.
>>
>
>This seems fine for the original question.
It is, worked perfectly for me. Thanks people.
>But, how about the case of user input?
>
>e.g.
>
>$ read R
>
>## user enters: a/{b,c}-d
>
>Is there then no way to do brace expansion on R?
I think you must use foo=($R).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author