Created
January 17, 2021 15:37
-
-
Save hrom512/8863e3b1576918c8efb391b74fb557b2 to your computer and use it in GitHub Desktop.
Autoload .env
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
source_env() { | |
if [[ -f .env ]]; then | |
source .env | |
fi | |
} | |
autoload -U add-zsh-hook | |
add-zsh-hook chpwd source_env | |
source_env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment