An alternative title for this question would be:
"command recognized in parent shell is not found in subshell"
I have this in a parent shell
source ~/.quicklock/ql.sh
and this command is recognized in my current shell:
ql_acquire_lock
then I run a script like so:
./script/tsc.sh
in that script we have:
#!/usr/bin/env bash
set -e;
ql_acquire_lock
I must be very confused about how shells work, because I thought a child shell/process would inherit the env of the parent, unless explicitly calling unset etc.?
Here is the error I get:
./scripts/tsc.sh: line 3: ql_acquire_lock: command not found