On Thu, May 16, 2024 at 11:31:55AM -0400, Chet Ramey wrote: > On 5/15/24 11:31 AM, Koichi Murase wrote: > > 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.
Yes, I'm inclined to agree with this. If you want it to fall back to $PATH, you can append the contents of $PATH to BASH_SOURCE_PATH as well. You get the most control if BASH_SOURCE_PATH is used exclusively when it's set.