Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: pcre callouts
- X-seq: zsh-workers 52258
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Oliver Kiddle <opk@xxxxxxx>, Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: pcre callouts
- Date: Tue, 31 Oct 2023 14:31:29 +0100
- Archived-at: <https://zsh.org/workers/52258>
- In-reply-to: <CAH+w=7aaS8ZHQ8Rd=ZPh8cnMu-Yg_gR2TOT2YnXvdGk337-WYw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <72311-1698710659.978677@cDMN.pAu_.Ex7V> <CAH+w=7bNAmZP3x+4n1qYCQBQiTM+9TZgTumVXnAftoeFcHcToA@mail.gmail.com> <CAH+w=7aaS8ZHQ8Rd=ZPh8cnMu-Yg_gR2TOT2YnXvdGk337-WYw@mail.gmail.com>
On 10/31/23, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Mon, Oct 30, 2023 at 8:26 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
> wrote:
>>
>> You could actually use ${.pcre._} I suppose. I'm undecided on whether
>> that's better.
>>
>> We do have a precedent for that now with ${|...} creating a scope.
>
> It occurs to me that if you create a scope, you could also create $_
> in that scope with PM_HIDE set, and then use $_ directly with no
> namespace needed.
Wouldn't any code inside need to immediately store the value of $_ in
another parameter to avoid overwriting it after the first command?
Seems like an unnecessary extra step if that's the case.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author