Maarten Billemont wrote:
On 16 Apr 2012, at 11:43, Linda Walsh wrote:
But it won't work for files below the top level of the library directory.
if I have include system/errno.shh, Source is crippled to not look in PATH.
When there's a slash in the file, it stops searching PATH.
So the reason you're not doing source /lib/system/errno.sh is because you want
it to search
multiple possible lib dirs for a system subdir?
----
It's searching for system/errno.shh in ~/bin/lib. In addition to the searching
the <bin> starting dir, it also looks <bin>/lib for any library tree.
It also keeps track of files included, with the idea that they not be
re-included.
I want a segmented path that is searched for include files -- just like in C,
Perl and most other languages. I.e. -- dir hierarchies that are 'somepath'
relative. (be it LIB, INCLUDE, PERLLIB, PATH or SHLIB)... None of them use
absolute pathnames -- if you change the INCLUDE/LIB paths, you can use
a different base.
So multi-level hierarchical sourcing (include) -- and since BASH uses PATH
for sourcing files with the sourcepath option, I decided sticking to PATH
was a consistent choice.