added nvm unload method to remove nvm from shell

master
Koen Punt 2014-03-16 18:09:54 +01:00
parent cf5f195d75
commit 744507b83e
1 changed files with 5 additions and 0 deletions

5
nvm.sh
View File

@ -218,6 +218,7 @@ nvm() {
echo " nvm alias <name> <version> Set an alias named <name> pointing to <version>"
echo " nvm unalias <name> Deletes the alias named <name>"
echo " nvm copy-packages <version> Install global NPM packages contained in <version> to current version"
echo " nvm unload Unload NVM from shell"
echo
echo "Example:"
echo " nvm install v0.10.24 Install a specific version number"
@ -556,6 +557,10 @@ nvm() {
"--version" )
echo "nvm v0.3.0"
;;
"unload" )
unset -f nvm nvm_print_versions nvm_checksum nvm_ls_remote nvm_ls nvm_remote_version nvm_version nvm_rc_version > /dev/null 2>&1
unset RC_VERSION NVM_NODEJS_ORG_MIRROR NVM_DIR NVM_CD_FLAGS > /dev/null 2>&1
;;
* )
nvm help
;;