4 ms·
Autoenv: Directory-Based Environments
- tsuujin 3y agoI’m not sure from the readme how this compares to direnv which seems to do the same thing.
- snthpy 3y agoJust had a quick look at both. Here's what I found: direnv * looks for a .envrc file * starts a subshell * loads environment variables into the subshell from the .envrc file autoenv * looks for a .env file * executes commands from that file in the current shell * allows cleanup via a .env.leave file This seems quite an unfortunate state of affairs to me because: * my .env files usually just contain environment variable declarations * a .envrc seems much more non-standard and based on the name alone I might expect it to be executed (like .bashrc) Is there any way to configure these to swap the filename conventions?
- snthpy 3y ago# autoenv AUTOENV_ENV_FILENAME: Name of the .env file; defaults to .env # direnv load_dotenv If set to true, also look for and load .env files on top of the .envrc files. If both .envrc and .env files exist, the .envrc will always be chosen first. Couldn't find anything to disable loading the .envrc file.