| 1 | # System-wide .zshenv file for zsh(1), sourced on all invocations of the shell. |
| 2 | # |
| 3 | # Global order: zshenv, zprofile, zshrc, zlogin |
| 4 | |
| 5 | # If $ZDOTDIR is not set and none of .zshenv, .zprofile, .zshrc, .zlogin exist |
| 6 | # in $HOME, read ZSH startup files from $XDG_CONFIG_HOME/zsh/ instead of $HOME. |
| 7 | # The point is to promote XDG-based location, but don't break existing setups. |
| 8 | if [[ -z "${ZDOTDIR-}" ]] && _x=("$HOME"/.z{shenv,profile,shrc,login}(N)) && (( ! $#_x )); then |
| 9 | ZDOTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/zsh |
| 10 | fi |
| 11 | unset _x |
| 12 | |
| 13 | # vim: set ft=zsh ts=4: |
| 14 | |