File that trigger
direnv when entering a folder
THIS SCRIPT CAN ONLY BE USED WITH 'direnv' PROGRAM
Direnv is a tool allowing to automatically call a specific script (.envrc) when entering or leaving a directory. In short, once configured and allow, you will have no command to type, after going to your working directory.
If you are using
direnv, when entering a folder with this script, you
might see following error:
direnv: error /path/to/.envrc is blocked. Run `direnv allow` to approve its content
This means you have to review its content with your favorite editor (vim here as example):
If you understand and agree to what is scripted in .envrc (as well as invoked scripts from it), allow it for direnv:
And that is all, each time you will enter the directory where file
.envrc is, this script will automatically be loaded when entering it and
automatically unloaded when leaving it.
Activate the directory environment by sourcing