diff --git a/zsh.d/nvm.zsh b/zsh.d/nvm.zsh index 40ecafe..29c7754 100644 --- a/zsh.d/nvm.zsh +++ b/zsh.d/nvm.zsh @@ -1,7 +1,6 @@ -# NVM -if [[ -s "$NVM_DIR/nvm.sh" ]]; then - source "$NVM_DIR/nvm.sh" # This loads nvm -fi -if [[ -s "$NVM_DIR/bash_completion" ]]; then - source "$NVM_DIR/bash_completion" # This loads nvm bash_completion +# Enable nvm if it is installed +if [ -d "$HOME/.nvm" ]; then + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" fi diff --git a/zsh.d/rbenv.zsh b/zsh.d/rbenv.zsh index f0f7a49..ff08b3f 100644 --- a/zsh.d/rbenv.zsh +++ b/zsh.d/rbenv.zsh @@ -1,4 +1,4 @@ -# Enable goenv if it is installed +# Enable rbenv if it is installed if (( $+commands[rbenv] )); then - eval "$(rbenv init -)" + eval "$(rbenv init - --no-rehash zsh)" fi