Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Support the mksh's ${|func;} substitution
- X-seq: zsh-workers 51903
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Lawrence Velázquez <larryv@xxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Support the mksh's ${|func;} substitution
- Date: Tue, 4 Jul 2023 23:30:12 -0700
- Archived-at: <https://zsh.org/workers/51903>
- 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:
>
> -- REPLY is treated as a local, i.e., it's value gets saved and
> restored around the substitution
(Quoting the initial message on the bash nofork thread)
> Bash creates 'REPLY' as an initially-unset
> local variable when COMMAND executes, and restores 'REPLY' to the value
> it had before the command substitution after COMMAND completes, as with
> any local variable.
This has the side-effect that testing the enclosing-scope value of
$REPLY from inside the substitution is impossible. I'm not sure how I
feel about that.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author