-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshenv.tmpl
30 lines (22 loc) · 911 Bytes
/
dot_zshenv.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Deduplicate the PATH variable, useful when nesting shells
typeset -U path
path+=($HOME/.local/bin)
path+=($HOME/scripts)
if [[ -r "$HOME/.cargo/env" ]]; then
. "$HOME/.cargo/env"
fi
export PNPM_HOME=$HOME/.local/share/pnpm
path+=($PNPM_HOME)
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# I use this snippet rather than the ohmyzsh nvm plugin becaue I want nvm to be available for chezmoi scripts
# and ohmyzsh is loaded only for interactive shells, which makes the nvm plugin unavailable
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
export EDITOR=nvim
export MANPAGER='nvim +Man!'
{{ if eq .chezmoi.os "darwin" }}
eval $(/opt/homebrew/bin/brew shellenv)
{{ end }}
. "$HOME/.secrets.env"