diff options
author | Alen <alen@dotfiles.xyz> | 2023-09-23 23:12:48 +0400 |
---|---|---|
committer | Alen <alen@dotfiles.xyz> | 2023-09-23 23:12:48 +0400 |
commit | 4d99a78332f3c5b9985386629cb38c78dc50b398 (patch) | |
tree | 376d2809577f7559bc1f81385b769096bb24d086 /dot_zshenv | |
parent | 923983285eb516aef65638afe16cb0fc21e90b8b (diff) |
Add more complete {,MAN,INFO}PATH setup and backup
Diffstat (limited to 'dot_zshenv')
-rw-r--r-- | dot_zshenv | 22 |
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 |