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:
>
> -- 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