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

Re: quonting and globbing



it seems I do, missed that. thanks!

Pier Paolo Grassi


Il giorno mar 2 mar 2021 alle ore 12:58 Mikael Magnusson <mikachu@xxxxxxxxx> ha scritto:
On 3/2/21, Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
> Hello, given this test code:
>
> test(){
> setopt -L extended_glob
> local glob=${(q)1}'.[0-9]##'
> touch $1.1 $1.2
> echo -E - $~glob
> }
>
>> test tmp
> tmp.1 tmp.2
>
>> test {tmp}
> test:4: no matches found: \{tmp\}.[0-9]##
>
> test '<tmp>'
> <tmp>.1 <tmp>.2
>
> It seems the quoting of the {} makes the expansion fail (on zsh 5.1.1)
> is there any way I can quote the file name according to the glob expansion
> rules?
> thanks

I think you want (b), not (q).

--
Mikael Magnusson


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