Last active
April 3, 2023 06:23
-
-
Save dogterbox/5006ac975a03faeb6585b3bf102b98ec to your computer and use it in GitHub Desktop.
Managing Environments with direnv (.envrc)
This file contains hidden or 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
# REF: https://stackabuse.com/managing-python-environments-with-direnv-and-pyenv/ | |
# installing | |
curl -sfL https://direnv.net/install.sh | bash | |
# with bash | |
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc | |
source ~/.bashrc | |
# with zsh | |
# echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc | |
# source ~/.zshrc | |
# config .envrc | |
echo 'export MY_ENV=hello' > .envrc | |
direnv allow | |
# echo $MY_ENV | |
# >> hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment