Created
April 6, 2012 22:22
-
-
Save collinschaafsma/2323523 to your computer and use it in GitHub Desktop.
Autoload an .env file in your zshell
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
# Put this in ~/.zshrc | |
chpwd() { | |
if [ -f ".env" ]; then source .env; fi | |
} | |
# Then make .env files in your project directories that look like this. | |
export S3_SECRET="<s3_secret>" | |
export S3_KEY="<s3_key>" | |
# Then add .env to ~/.gitignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment