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.
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. :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
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. :)