-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load different env file #348
Comments
The current workaround is to add I am not against extending direnv to support that scenario. |
Do you want me to look to integrate that ? |
Yeah, have a look. We have a config.toml file now where the option could be introduced. I haven't really thought out the best approach to handle this yet. Maybe template .envrc files matches to specific path patterns could be nice. |
Would love to have this as well. Either that, or the option to globally configure direnv (in |
I think that we need a template system that can load pre-defined
where
I'm a bit wary of complicating direnv but that seems like a useful extension. |
I am interested in having If I could instead specify which visible (as opposed to hidden) file to load environment values from, then I could store the non-secret configuration information in them in a way that is obvious and maintainable. Real secrets like API keys will still have to be handled differently, but at least I could avoid hiding important configuration information in hidden files. |
one approach is to add this to the [[ -f .envrc.private ]] && source_env .envrc.private that gives a level of extensibility for local overrides |
I wanted to load a ".env" file with a different name (or multiple of them) and the set -a
. <conf file>
set +a Where I looked through the stdlib, but didn't find any other clear solution for it. Just wanted to leave this here as it pops up when searching for solutions and "load different env file" was what I wanted to do too, though maybe with a different intent :) |
NOTE: the solution offered by @zimbatm is not secure, checksum of is there method that also checks for checksum?:
|
@bmeynell Old thread, I know, but loading a |
Also, another issue: if you are doing more complex things like integrating with the 1Password CLI, the export SOME_VARIABLE=$(op read op://Private/item-name/password) You have to rely on the |
Hi,
I wanted to ask if you would like to add support for different file name, for now direnv use
.envrc
but why not add.env
or other file name.This would be great for teams who use direnv, for example someone can use dotenv from oh-my-zsh and another can use direnv.
Thanks for reading.
The text was updated successfully, but these errors were encountered: