vinix-ports / ports / zsh / zshenv
13 lines · 11 sloc · 549 bytes · c33d8afc2906b8dd9a8b905224eccd49a44f7ad5
Raw
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.
8if [[ -z "${ZDOTDIR-}" ]] && _x=("$HOME"/.z{shenv,profile,shrc,login}(N)) && (( ! $#_x )); then
9 ZDOTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/zsh
10fi
11unset _x
12
13# vim: set ft=zsh ts=4:
14