diff --git a/nvm.sh b/nvm.sh index 538922b..5ecf6f2 100644 --- a/nvm.sh +++ b/nvm.sh @@ -92,6 +92,11 @@ nvm_version() { PATTERN='current' fi + if [ "$PATTERN" = "current" ]; then + nvm_ls_current + return $? + fi + VERSION=`nvm_ls $PATTERN | tail -n1` echo "$VERSION"