ohmyzsh/plugins/dotenv/dotenv.plugin.zsh
Guilherme Santos a4460d7389 Export .env if you just open a new session
Otherwise you need to move from directories to make it works
2018-01-24 12:45:55 +01:00

11 lines
162 B
Bash

#!/bin/zsh
source_env() {
if [[ -f .env ]]; then
source .env
fi
}
autoload -U add-zsh-hook
add-zsh-hook chpwd source_env
add-zsh-hook precmd source_env