Would source roots make sense for a Shell implemen...
# development
h
Would source roots make sense for a Shell implementation? If you have an
.sh
file at
src/sh/foo.sh
and it sources
src/sh/dep.sh
, would you expect to do
source dep.sh
or
source src/sh/dep.sh
? I don't think there would be an equivalent to PYTHONPATH, beyond maybe cd-ing into the source root?
c
To make things relocatable I think
source dep.sh
makes the most sense
h
I suspect that the repo root is the only "source root" that makes sense for shell
👍 1
that is, we shouldn't do any prefix stripping
h
I think I agree with you Benjy. Too much of a recipe for confusion to have to reason about source roots
e
Hopefully some of these modelling questions can be put to bed once and for all for the sake of an easy to follow system. It seems to me, if the language does not have the concept of an import path, no source roots. For she'll script sourcing there is no such import path (no BASH_SOURCE_PATH), so no source roots. Just the plain filesystem.
👆 1
1