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

Re: [PATCH] Support the mksh's ${|func;} substitution



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