add dotenv plugin (#4373)

This commit is contained in:
Arthur 2016-12-14 22:49:08 +06:00 committed by Marc Cornellà
commit 8d35fa0e2f
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#!/bin/zsh
source_env() {
if [[ -f .env ]]; then
source .env
fi
}
autoload -U add-zsh-hook
add-zsh-hook chpwd source_env