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 ?

  • DO you mean -E -s or the commands you have in the text?
    – mmmmmm
    Nov 15, 2022 at 20:48
  • -E is the short version of --preserve-env
    – Damien L
    Nov 15, 2022 at 21:09


You must log in to answer this question.

Browse other questions tagged .