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

Re: PATCH: pcre callouts



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