Hello Brad!

> It would be fantastic if there was a nicer way to source files from the
> same folder instead of copy-pasting complicated logic in every script.

I'm not sure if I understand your questions correctly, but did you try

source "${0%/*}/file.ext"

?

>    - my sourceables also need logic to prevent them from being executed by
>    accident (they tell you to source them instead).

Just don't give them execute permission (at least when running on a unix 
system).

Best regards,

Martin

Reply via email to