bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH v2 5/8] builtins/source: parse the -i option


From: Chet Ramey
Subject: Re: [PATCH v2 5/8] builtins/source: parse the -i option
Date: Fri, 17 May 2024 10:39:34 -0400
User-agent: Mozilla Thunderbird

On 5/16/24 10:23 PM, Matheus Afonso Martins Moreira wrote:
If you don't set BASH_SOURCE_PATH (from the user's perspective;
I'm not sure what I think about a loaded `library' changing the global
user settings by setting it), you get the historical behavior.

It's also important to consider the opposite situation:
distributions and/or users setting BASH_SOURCE_PATH globally
which then results in existing scripts _not_ getting the historical
behavior which matches what their authors expected at the time.

I'm more confident in users being able to manage their own shell
environment.

In order to preserve that behavior, users would have to very carefully
manage the scope of their BASH_SOURCE_PATH variable.

As with everything.


Even if users resorted to that, the environment variables
are passed down to new processes,

You don't have to export variables. I would recommend not exporting
such a variable to begin with unless you're sure of its effects.

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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