I understand that
~/.zshenv gets sourced every time that an instance of
This implies that having the following line
~/.zshenv would result in an infinite regress:
(echo "$$ $(date)" >> $HOME/.debug.zshenv)
(...) represents a subshell, and hence another sourcing of
This reasoning notwithstanding, the line shown above is harmless, AFAICT. In particular,
$HOME/.debug.zshenv shows only one line after I start a new shell with
~/.zshenv is not getting sourced anew when the line above is evaluated. Why not?
1For that matter, the expression
$(date) also entails creating a subshell.