diff --git a/zsh/.zshenv b/zsh/.zshenv index cdffe65..0d17869 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,5 +1,11 @@ -set -o allexport -. ~/.config/environment.d/*.conf -set +o allexport +# Assume environment is already loaded if ZDOTDIR is set. +# This speeds up starting zsh if it's not required. Attempt +# to load the environment if it's absent, though, in case +# ZDOTDIR is overriden and .zshrc is not in ~ +if [ -z "$ZDOTDIR" ]; then + set -o allexport + . ~/.config/environment.d/*.conf + set +o allexport +fi # vim: ft=sh