mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
9ecde7f732
Fixes #7017
16 lines
217 B
Bash
16 lines
217 B
Bash
source_env() {
|
|
if [[ -f .env ]]; then
|
|
if [[ -o a ]]; then
|
|
source .env
|
|
else
|
|
set -a
|
|
source .env
|
|
set +a
|
|
fi
|
|
fi
|
|
}
|
|
|
|
autoload -U add-zsh-hook
|
|
add-zsh-hook chpwd source_env
|
|
|
|
source_env
|