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

Re: [PATCH] docs: clarify glob-qualifier syntax



On Tue 27 May 2025, at 13:02, Stephane Chazelas wrote:
> See https://www.zsh.org/mla/workers/2019/msg00720.html by Bart in
> response to https://www.zsh.org/mla/workers/2019/msg00719.html
> which confirms one can rely on that.

ty

On Tue 27 May 2025, at 13:02, Stephane Chazelas wrote:
> That was more about glob operators than "meta-characters" btw.

it seems like quoting protects the end delimiter for the following:

  ## ^^ ** () || [] ?? ~~ ==

all of those are pattern meta-characters (zsh.h PATCHARS) except for ==
(which are SPECCHARS)

<> are also PATCHARS but they cause a parse error

the rest of SPECCHARS cause a parse error or similar, except {}, they
just terminate the string like any non-special character

i guess it just comes down to parsing precedence. maybe <> should never
have been on that list? i can't go back any further than ~4.3.12 but it
doesn't work there either

On Tue 27 May 2025, at 13:02, Stephane Chazelas wrote:
> Since that thread, I've settled for [...] for most of my
> delimiters, whether in glob qualifiers or parameter expansion
> flags...

i normally use <> for expansion flag args. visually i think they're
ideal. but i never noticed they don't work for glob qualifiers since i
rarely use the ones that take args

dana




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