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: Thu, 16 May 2024 11:31:55 -0400
User-agent: Mozilla Thunderbird

On 5/15/24 11:31 AM, Koichi Murase wrote:
2024年5月15日(水) 22:21 Chet Ramey <chet.ramey@case.edu>:
On 5/14/24 7:15 PM, Koichi Murase wrote:
In case we talk about different designs, I assume the following one:

* `source name' searches the files in BASH_SOURCE_PATH, PATH, and the
current working directory.

No, I'm proposing that this behavior be the default, without the option:

Yes, that's my intent. I mean "without the option" by the above `source name'.

* `source -i name', if it would be added, searches the files in
BASH_SOURCE_PATH (excluding PATH and the current working directory
unless `.' is included in BASH_SOURCE_PATH).

Maybe it was not clear to use `source name' and `source -i name' to
describe the idea. I meant I assumed the search domain being

* BASH_SOURCE_PATH + PATH + PWD without the option

It seems to me that this isn't useful. The whole reason to have and use
BASH_SOURCE_PATH is not to use PATH; a fallback to PATH if something
isn't found in BASH_SOURCE_PATH doesn't allow that. And if you're using
BASH_SOURCE_PATH, you have to set it, and if you want `.' in there,
add it. 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.

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