help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Feature Request] do comsub with builtins/functions in current env


From: Chet Ramey
Subject: Re: [Feature Request] do comsub with builtins/functions in current env
Date: Mon, 10 Oct 2022 17:05:23 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

On 10/10/22 2:55 AM, konsolebox wrote:
On Sun, Oct 9, 2022 at 4:46 PM Akbarkhon Variskhanov
<akbarkhon.variskhanov@gmail.com> wrote:

I'd really like to see Bash not create a subshell for command
substitutions involving built-ins and functions.

Practically not a fan of it because it has to examine the command,
calculate and make sure it doesn't make changes in the calling shell
that $() shouldn't.

A new construct that explicitly can modify the current shell environment,
as with the ksh93 ${ list; }, is the better option. There's no reason to
change $(...).

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]