DEV Community

Discussion on: zshLoadOrder

Collapse
 
roguescholar profile image
Peter J. Mello

You kind of contradict yourself in the zshenv section when you say that the file is required to be in $HOME. Shortly thereafter you suggest setting a new value for $ZDOTDIR which is the actual location that .zshenv is sourced from and for which $HOME is simply the default value. It's also advisable to use a conditional brace expansion to set $ZDOTDIR, such as ${XDG_CONFIG_DIR:-$HOME/.config}/zsh.

Collapse
 
alephalpha0 profile image
alephalpha0

Thank you for the critique, but from my experience using Termux, Manjaro, Mint, Arch, and Puppy variants of Linux: ZSH will always source .zshenv from $HOME, regardless if XDG_CONFIG*, ZDOTDIR, or any other env variable is set to something user specific. I might just have been lucky, I don't know. I also don't wanna attempt to read the entire ZSH manual to find out. :)