chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f22ce77
)
dot/zshenv: Don't read `~/.zprofile' in a login shell.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 12 Jul 2024 17:50:22 +0000
(18:50 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 12 Jul 2024 17:50:22 +0000
(18:50 +0100)
The `~/.zshenv' file gets read /before/ `~/.zprofile', so, if this is
a login shell, the profile would be read twice. Take evasive action.
dot/zshenv
patch
|
blob
|
blame
|
history
diff --git
a/dot/zshenv
b/dot/zshenv
index ec3683811be5f570cf6cb4c6a9d928d52ef1e0d0..5f57b55b28e582aefad5052958ec46d43476b0dc 100644
(file)
--- a/
dot/zshenv
+++ b/
dot/zshenv
@@
-3,5
+3,5
@@
### Last ditch sanity for Zsh invocations.
case ${SSH_CONNECTION+t},${__mdw_profile+t} in
### 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
esac