diff options
Diffstat (limited to 'main/zsh/zshenv')
-rw-r--r-- | main/zsh/zshenv | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/main/zsh/zshenv b/main/zsh/zshenv new file mode 100644 index 00000000000..f249e33bbbb --- /dev/null +++ b/main/zsh/zshenv @@ -0,0 +1,13 @@ +# System-wide .zshenv file for zsh(1), sourced on all invocations of the shell. +# +# Global order: zshenv, zprofile, zshrc, zlogin + +# If $ZDOTDIR is not set and none of .zshenv, .zprofile, .zshrc, .zlogin exist +# in $HOME, read ZSH startup files from $XDG_CONFIG_HOME/zsh/ instead of $HOME. +# The point is to promote XDG-based location, but don't break existing setups. +if [[ -z "${ZDOTDIR-}" ]] && _x=("$HOME"/.z{shenv,profile,shrc,login}(N)) && (( ! $#_x )); then + ZDOTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/zsh +fi +unset _x + +# vim: set ft=zsh ts=4: |