1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-29 17:20:09 +00:00
ohmyzsh/plugins/dotenv/dotenv.plugin.zsh

17 lines
217 B
Bash
Raw Normal View History

2016-12-14 16:49:08 +00:00
#!/bin/zsh
source_env() {
if [[ -f .env ]]; then
if [[ -o a ]]; then
source .env
else
set -a
source .env
set +a
fi
2016-12-14 16:49:08 +00:00
fi
}
autoload -U add-zsh-hook
add-zsh-hook chpwd source_env