From: Mark Wooding Date: Fri, 12 Jul 2024 17:50:22 +0000 (+0100) Subject: dot/zshenv: Don't read `~/.zprofile' in a login shell. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/59f7f8f2d117940b6e7009a3951b4689fdd50659 dot/zshenv: Don't read `~/.zprofile' in a login shell. The `~/.zshenv' file gets read /before/ `~/.zprofile', so, if this is a login shell, the profile would be read twice. Take evasive action. --- diff --git a/dot/zshenv b/dot/zshenv index ec36838..5f57b55 100644 --- a/dot/zshenv +++ b/dot/zshenv @@ -3,5 +3,5 @@ ### Last ditch sanity for Zsh invocations. case ${SSH_CONNECTION+t},${__mdw_profile+t} in - t,) . "$HOME/.zprofile" ;; + t,) if [[ ! -o login ]]; then . "$HOME/.zprofile"; fi ;; esac