about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2019-03-20T15·13+0000
committerWilliam Carroll <wpcarro@gmail.com>2019-03-20T15·13+0000
commitda070adf8ad52920cbf5b74060d1bdc6b2e809e4 (patch)
treeffd662385256cc6e1eba83ec0be3c7a630fff979
parent7f0c0084e2074f6f88dc5cb2e968a53dc923c4c0 (diff)
Move source ~/.profile to ~/.zprofile
See the comments in .zprofile for an explanation and a link to a much larger
conversation about this issue. It's a bit messy.
-rw-r--r--configs/shared/zsh/.zprofile10
-rw-r--r--configs/shared/zsh/.zshrc2
2 files changed, 10 insertions, 2 deletions
diff --git a/configs/shared/zsh/.zprofile b/configs/shared/zsh/.zprofile
new file mode 100644
index 000000000000..b8be66f6f6b3
--- /dev/null
+++ b/configs/shared/zsh/.zprofile
@@ -0,0 +1,10 @@
+# ZSH seems to avoid sourcing ~/.profile during SSH sessions.
+# X (or something else) seems to source ~/.profile with it initializes.
+# Putting this here allows my SSH sessions to have the expected configuration.
+#
+# Putting this here instead of in my .zshrc or .zshenv is advantageous since it
+# is only called once when a terminal is created; subshells and nested ZSH
+# sessions don't re-source this file.
+#
+# See this thread for more information: https://groups.google.com/a/google.com/forum/#!topic/zsh-users/VO2lEJRfFzk
+source ~/.profile
diff --git a/configs/shared/zsh/.zshrc b/configs/shared/zsh/.zshrc
index a6b77af89129..db60e3841059 100644
--- a/configs/shared/zsh/.zshrc
+++ b/configs/shared/zsh/.zshrc
@@ -1,5 +1,3 @@
-source ~/.profile
-
 source ~/antigen.zsh
 
 # Load the oh-my-zsh library