Running zsh
on macOS Ventura
→ With
sudo --preserve-env -s
the environment variable ZDOTDIR
is not preserved but all the others are.
→ With sudo --preserve-env=ZDOTDIR -s
the variable ZDOTDIR
is preserved but not the other variables.
Why is ZDOTDIR
not preserved in the first case ?