Created
December 26, 2019 21:22
-
-
Save JuneKelly/11a91a250f5ab8831403a8c9e2b422e8 to your computer and use it in GitHub Desktop.
Zsh nvm wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export NVM_DIR="$HOME/.nvm" | |
function nvm() { | |
if [[ -v __nvm_recursion_protect__ ]]; then | |
echo 'error: recursive call to nvm' | |
return 1 | |
fi | |
local __nvm_recursion_protect__='true' | |
if [[ "$(type nvm)" =~ 'zshrc' ]]; then | |
source "$NVM_DIR/nvm.sh" | |
source "$NVM_DIR/bash_completion" | |
fi | |
nvm $@ | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment