-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
# first source parent directories | ||
# ref https://direnv.net/docs/installation.html | ||
# when direnv is installed, env vars will be automatically exported when cd'ing into a directory, and unset when cd'ing out of the directory | ||
# brew install direnv | ||
# install direnv hook ref https://direnv.net/docs/hook.html | ||
# hook for bash | ||
# cat ~/.bashrc | grep 'direnv hook' || ( echo 'eval "$(direnv hook bash)"' >> ~/.bashrc && eval "$(direnv hook bash)" ) | ||
# hook for zsh | ||
# cat ~/.zshrc | grep 'direnv hook' || ( echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc && eval "$(direnv hook zsh)" ) | ||
# run once in this directory to trust this .envrc file: | ||
# direnv allow | ||
|
||
# any `.envrc` files in this directory's parents will first be sourced by direnv when cd'ing into this directory | ||
source_up_if_exists | ||
# then overwrite with current directory env vars | ||
# write your secrets in the `.env` file (gitignore'd) - these will take presedence over env vars exported in parent directories | ||
source_env_if_exists .env |