ENH move all environment stuff to manual shell functions

This commit is contained in:
Nathan Dwarshuis 2022-01-22 18:41:08 -05:00
parent 3858dbb3cd
commit 51ce30df96
3 changed files with 7 additions and 5 deletions

View File

@ -5,10 +5,6 @@ userresources="$XDG_CONFIG_HOME/X11/xresources"
systemctl --user import-environment PATH
systemctl --user import-environment DISPLAY
# add gempath to PATH
gempaths="$(/usr/bin/gem env gempath):"
export PATH="${gempaths//:/\/bin:}:$PATH"
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi

View File

@ -59,6 +59,8 @@ x11-clip-wrap-widgets paste $paste_widgets
# magic to automatically call the shims
zsh-pyenv () {
export PATH=$PYENV_ROOT/shims:$PATH
if command -v pyenv 1>/dev/null 2>&1; then
echo "Activating pyenv"
eval "$(pyenv init - | sed '/PATH/d' -)"
@ -70,6 +72,10 @@ zsh-pyenv () {
zsh-rbenv () {
gempaths="$(/usr/bin/gem env gempath):"
export PATH="${gempaths//:/\/bin:}:$PATH"
export PATH=$RBENV_ROOT/shims:$PATH
if command -v rbenv 1>/dev/null 2>&1; then
echo "Activating rbenv"
eval "$(rbenv init - | sed '/PATH/d' -)"

View File

@ -68,7 +68,7 @@ PASSWORD_STORE_DIR DEFAULT=${GNUPGHOME}/pass
# Path
#--------------------#
PATH OVERRIDE={{- if eq .chezmoi.hostname "petrucci4prez" }}${RBENV_ROOT}/shims:${PYENV_ROOT}/shims:{{- end }}@{HOME}/.bin:@{HOME}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin
PATH OVERRIDE=@{HOME}/.bin:@{HOME}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin
#--------------------#
# Applications