> I expected that the source builtin without the flag would also
> consider BASH_LIBRARIES_PATH if present, which is more similar to
> Chet's suggestion in the POSIX mode. More specifically, the source
> builtin first searches for BASH_LIBRARIES_PATH if present, or
> otherwise falls back to PATH and the local files. When the flag is
> specified, the fallbacks are disabled.

That was my original idea, yes. I'm open to implementing it that way.
I decided not to do that because there are a few special cases already
in the way bash handles PATH which can be confusing.
This way source will behave just as before unless the option is passed,
in which case it will not consider PATH at all, leading to unambiguous
behavior at all times.

Reply via email to