The order of files being loaded by ZSH is the following:
.zprofile if login
.zshrc if interactive
.zlogin if login
Why? sometimes variables might be replaced by subsequent files or some other configuration that you don’t desire might be applied.
Be careful when setting things on
.zshenv since it can be overriden by subsequent scripts. Also, only
.zshrc should be used for things like prompt colors and user scripts.