Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] docs: clarify glob-qualifier syntax
- X-seq: zsh-workers 53693
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] docs: clarify glob-qualifier syntax
- Date: Wed, 28 May 2025 17:05:07 +0100 (BST)
- Archived-at: <https://zsh.org/workers/53693>
- Feedback-id: 20250528-p.w.stephenson@xxxxxxxxxxxx:oxsmtp-prd-nl-vmo:Authrelay:p.w.stephenson@xxxxxxxxxxxx
- Importance: Normal
- In-reply-to: <dd97b97c-3bc8-4afd-915f-81070da8ff4e@app.fastmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <dd97b97c-3bc8-4afd-915f-81070da8ff4e@app.fastmail.com>
> On 27/05/2025 13:17 BST dana <dana@xxxxxxx> wrote:
> ps: it seems like the ability to use <...> as the delimiters is broken.
> haven't investigated
That's in the lexer, so changing it could potentially be hairy. I don't
know why angle brackets should have to be special at this point (at
least to the extent of starting a new word) but that certainly doesn't
mean there's no reason, particularly since parentheses are fairly
heavily overloaded.
See what side effects the following has, though we certainly don't want
to commit it just before a release. It doesn't seem to cause any tests
to fail, at least.
cheers
pws
diff --git a/Src/lex.c b/Src/lex.c
index efbb62b..2f9770a 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1169,7 +1169,7 @@ gettokstr(int c, int sub)
c = Comma;
break;
case LX2_OUTANG:
- if (in_brace_param || sub)
+ if (in_brace_param || sub || pct)
break;
e = hgetc();
if (e != '(') {
@@ -1206,7 +1206,7 @@ gettokstr(int c, int sub)
break;
}
lexstop = 0;
- if (in_brace_param || sub)
+ if (in_brace_param || sub || pct)
break;
goto brk;
case LX2_EQUALS:
Messages sorted by:
Reverse Date,
Date,
Thread,
Author