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

Re: Assign to outer parameter from function called by zargs



On Tue, Mar 28, 2023 at 10:50 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> assign_outer runs in a subshell, so it cannot modify the parameters of
> the parent shell.

More specifically, there's this comment in zargs:

# Everything has to be in a subshell so that we don't "wait" for any
# unrelated jobs of the parent shell.

The "wait" is necessary to set the return status of zargs in (as
nearly as possible) the same way that xargs would do, so you can't run
current-shell actions with zargs.

What's the context of your question and your desired end result?




Messages sorted by: Reverse Date, Date, Thread, Author