diff --git a/dotfiles/zsh/initializations.zsh b/dotfiles/zsh/initializations.zsh index 3d9c154..830c483 100644 --- a/dotfiles/zsh/initializations.zsh +++ b/dotfiles/zsh/initializations.zsh @@ -1,7 +1,9 @@ #!/bin/zsh if [[ "$OSTYPE" == "linux-gnu" ]]; then - export PATH="$HOME/.pyenv/bin:$PATH" + export PATH=/usr/local/bin:$PATH + export PYENV_ROOT="$HOME/.pyenv" + export PATH="$PYENV_ROOT/bin:$PATH" # For whatever reason the linux version of pyenv doesnt install `pyenv-virtualenv-init`. eval "$(pyenv init -)" @@ -9,9 +11,20 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then fi if which pyenv-virtualenv-init > /dev/null; then + export PATH=/usr/local/bin:$PATH + export PYENV_ROOT="$HOME/.pyenv" + export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" fi + +if hash pyenv 2>/dev/null; then + export PYENV_ROOT="$HOME/.pyenv" + command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" +fi + + # RVM configuration [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" diff --git a/dotfiles/zsh/zprofile b/dotfiles/zsh/zprofile index bba9daf..3fff494 100644 --- a/dotfiles/zsh/zprofile +++ b/dotfiles/zsh/zprofile @@ -13,12 +13,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then export PATH="/usr/local/opt/tcl-tk/bin:$PATH" fi -if hash pyenv 2>/dev/null; then - export PYENV_ROOT="$HOME/.pyenv" - command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" - eval "$(pyenv init -)" -fi - export PATH=$HOME/bin:/usr/local/bin:$PATH test -r /home/vm/.opam/opam-init/init.sh && . /home/vm/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true