Hello! I have taken everyone's thoughts into account and
developed a patch set implementing this feature.
It avoids overloading the source builtin by defining
a new builtin named import which behaves almost exactly
the same way, the only difference is it looks for files
in the directories specified in BASH_IMPORT_PATH
and only the executable files.
This also has the advantage that it may be turned off.
This gives bash pretty good support for scripting libraries.
I haven't decided on a default value for the variable yet.
I was thinking /usr/lib/bash:"${HOME}"/.local/lib/bash,
perhaps with support for the XDG variables.
Please let me know what you think.
Matheus