Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Assign to outer parameter from function called by zargs
- X-seq: zsh-users 28993
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Eric Nielsen <ericbn@xxxxxxx>
- Cc: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Re: Assign to outer parameter from function called by zargs
- Date: Tue, 28 Mar 2023 12:53:15 -0700
- Archived-at: <https://zsh.org/users/28993>
- In-reply-to: <CAN=4vMp0b0wOK2mSSYKFnZGiY3jFW_oGAmsT_O-d2EdpCD-9nQ@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <db828e7542e0c1a9738d1a6acc90eae6c5175075@hey.com> <CAN=4vMp0b0wOK2mSSYKFnZGiY3jFW_oGAmsT_O-d2EdpCD-9nQ@mail.gmail.com>
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