On Fri, Jun 21, 2024 at 10:01 PM Martin D Kealey <mar...@kurahaupo.gen.nz> wrote: > > I support BASH_SOURCE_PATH as replacing the normal PATH search only for "." > and "source". > > In addition I propose some new '~' expansions which will give concise > expression of dirname+realpath without penalizing code that does not need it.
You can also just add another option that enables it. Just make sure the script that enables the option also gets its own real path and not only the ones that get source'd after it. Lazily resolving the script's real path also means you have to store the context directories to another list. -- konsolebox