summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--dot_zshenv22
1 files changed, 15 insertions, 7 deletions
diff --git a/dot_zshenv b/dot_zshenv
index 27779ba..df0f06e 100644
--- a/dot_zshenv
+++ b/dot_zshenv
@@ -41,13 +41,21 @@ export LC_ALL=en_US.UTF-8
 export LESS="--RAW-CONTROL-CHARS --chop-long-lines --mouse"
 export PAGER="less"
 
-# Add user's bin or .local/bin to PATH, if they exist
-if [[ -d "${HOME}/bin" ]]; then
-    PATH="${HOME}/bin:${PATH}"
-fi
-if [[ -d "${HOME}/.local/bin" ]]; then
-    PATH="${HOME}/.local/bin:${PATH}"
-fi
+# Add ~/.local paths to {,MAN,INFO}PATH and fpath
+export PATH="${HOME}/.local/bin${PATH:+:${PATH}}"
+export MANPATH="${XDG_DATA_HOME:-${HOME}/.local/share}/man${MANPATH:+:${MANPATH}}"
+export INFOPATH="${XDG_DATA_HOME:-${HOME}/.local/share}/info${INFOPATH:+:${INFOPATH}}"
+fpath=(
+    "${ZDOTDIR:-${HOME}/.config/zsh}/functions"
+    "${XDG_DATA_HOME:-${HOME}/.local/share}/zsh/site-functions"
+    $fpath
+)
+
+# Back these up as they could get mangled in system profile
+# TODO: Restore them in zshrc?
+export $__PATH="${PATH}"
+export $__MANPATH="${MANPATH}"
+export $__INFOPATH="${INFOPATH}"
 
 # Never allow global pip
 export PIP_REQUIRE_VENV=1