oscar

joined 1 year ago
[–] oscar@programming.dev 3 points 1 year ago

I'm 24 hours in and I didn't even know there were acts lol, but I assume I'm also on act 1. I've pretty much only done side missions.

[–] oscar@programming.dev 1 points 1 year ago

Good point. But then if both the script and the command have the same filename, it will be important to make sure the script has a higher precedence in the PATH. Adding it to the end of .bashrc should be enough I think.

[–] oscar@programming.dev 0 points 1 year ago (2 children)

You could write a shell script:

#!/usr/bin/env sh

export SOME_ENV_VAR=value

command

Then place it on your path, for example /usr/local/bin/command_with_env.

I avoided overriding the command itself and naming the script the same, because then I think it would try to invoke itself.

view more: ‹ prev next ›