Quote the version.
diff --git a/nvm.sh b/nvm.sh
index 820624e..7ed56e0 100644
--- a/nvm.sh
+++ b/nvm.sh
@@ -785,7 +785,7 @@
         nvm help
         return 127
       fi
-      VERSION=$(nvm_version "$2")
+      VERSION="$(nvm_version "$2")"
 
       # declare local INSTALLS first, otherwise it doesn't work in zsh
       local INSTALLS