Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Support the mksh's ${|func;} substitution
- X-seq: zsh-workers 51906
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Support the mksh's ${|func;} substitution
- Date: Wed, 5 Jul 2023 18:39:35 -0700
- Archived-at: <https://zsh.org/workers/51906>
- In-reply-to: <CAH+w=7aDHvJV6K=Znbur=vw8ASt-MpKWgBpUm9CHT_akkgg9sg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAKc7PVB9EHmNS9mL00iwZbNDeZOawBL_TWV=RYnZaNYacUTphQ@mail.gmail.com> <CAH+w=7Y1xZy1B21rD-zn+oAtBayK=StxitQ7BEWTjDbNopf=RA@mail.gmail.com> <e27c46cc-eeca-4f90-a5b1-d1f0f1fb0743@app.fastmail.com> <CAH+w=7aDHvJV6K=Znbur=vw8ASt-MpKWgBpUm9CHT_akkgg9sg@mail.gmail.com>
On Tue, Jul 4, 2023 at 10:32 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> The first three of those are implementable within the structure of the
> patch from workers/51898 although it's a little messy because of the
> multiple "return" points in paramsubst().
Fiddling with this has led me to find a few other issues with either
of Sebastian's or my earlier patch in this thread, namely, both need
to be more clever about finding the closing brace of the ${|...}
substitution. This in turn leads me to ask if one of the old hands
with the lexer can explain why, inside double quotes, "}" is always
replaced by Outbrace but "{" is not replaced by Inbrace unless it is
preceded by "$"?
A small tweak to the lexer still passes all tests and makes
skipparens(Inbrace, Outbrace, &str) work more consistently, but I
don't want to have missed something.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author