Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: quonting and globbing
- X-seq: zsh-users 26561
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- Cc: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Re: quonting and globbing
- Date: Tue, 2 Mar 2021 12:58:26 +0100
- Archived-at: <https://zsh.org/users/26561>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-03/CAHYJk3TM7U%2BD%2BFK%2BrpZqmTuQmBf%3DpDPYwBarhNXfn-eFdjFQJQ%40mail.gmail.com>
- In-reply-to: <CAP+y1xAHJ-cejSmsrZcThJ-dDWStApAY=QukV1ivYpvb1idNWA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAP+y1xAHJ-cejSmsrZcThJ-dDWStApAY=QukV1ivYpvb1idNWA@mail.gmail.com>
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