|
|
|
|
|
by sph
1229 days ago
|
|
Direnv loads the environment variables listed in .envrc in the current shell. On Unix all spawned processes inherit the environment of their parent. It's perfect for development, and reading .envrc outside of interactive shells is just a "source .envrc" away, or use the appropriate plugin (such as Emacs direnv mode) |
|
So in the end the magic of direnv is only helpful in special circumstances. Outside those circumstances, you'd have to treat its directory local configuration file like an .env file anyway, and a more complicated one at that given that it's likely to contain shell keywords (such as unset) which your parser has to be aware of - so now you're worse off than with regular .env files.