diff --git a/plugins/available/nvm.plugin.bash b/plugins/available/nvm.plugin.bash index 87dce644..0e6da5d8 100644 --- a/plugins/available/nvm.plugin.bash +++ b/plugins/available/nvm.plugin.bash @@ -1,22 +1,23 @@ -# Bash-it no longer bundles nvm, as this was quickly becoming outdated. +# shellcheck shell=bash # # BASH_IT_LOAD_PRIORITY: 225 # +# Bash-it no longer bundles nvm, as this was quickly becoming outdated. # Please install nvm from https://github.com/creationix/nvm.git if you want to use it. cite about-plugin about-plugin 'node version manager configuration' -export NVM_DIR=${NVM_DIR:-$HOME/.nvm} +export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" # This loads nvm -if _bash_it_homebrew_check && [ -s "${BASH_IT_HOMEBREW_PREFIX}/nvm.sh" ] +if _bash_it_homebrew_check && [[ -s "${BASH_IT_HOMEBREW_PREFIX}/nvm.sh" ]] then - . "${BASH_IT_HOMEBREW_PREFIX}/nvm.sh" + source "${BASH_IT_HOMEBREW_PREFIX}/nvm.sh" else - [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" + [[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" fi -if ! command -v nvm &>/dev/null +if ! _command_exists nvm then function nvm() { echo "Bash-it no longer bundles the nvm script. Please install the latest version from"