From d527bf3f02aa25ba2dad67abfc7526deb4f2b85f Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Thu, 2 Jun 2022 20:10:40 -0500 Subject: [PATCH] Add in homebrew nvm path --- zsh/.zshrc | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index ff97c02..40889fa 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -94,7 +94,9 @@ else if [ -z ${NVM_DIR+x} ]; then export NVM_DIR="$HOME/.nvm" - if [ -s "$NVM_DIR/nvm.sh" ]; then + if [ -s "/opt/homebrew/opt/nvm/nvm.sh" ]; then + source "/opt/homebrew/opt/nvm/nvm.sh" + elif [ -s "$NVM_DIR/nvm.sh" ]; then source "$NVM_DIR/nvm.sh" elif [ -s "/usr/share/nvm/init-nvm.sh" ]; then source /usr/share/nvm/init-nvm.sh @@ -104,16 +106,3 @@ else fi } fi - -# TODO: If/when I use nvm, will probably need this -# -# You should create NVM's working directory if it doesn't exist: -# -# mkdir ~/.nvm -# -# Add the following to ~/.zshrc or your desired shell -# configuration file: -# -# export NVM_DIR="$HOME/.nvm" -# [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm -# [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion