Avoid calling "nvm_ls current" and call "nvm_ls_current" directly

master
Jordan Harband 2014-07-18 18:16:21 -07:00
parent ca43ca21f5
commit 55677dba4a
1 changed files with 5 additions and 0 deletions

5
nvm.sh
View File

@ -92,6 +92,11 @@ nvm_version() {
PATTERN='current' PATTERN='current'
fi fi
if [ "$PATTERN" = "current" ]; then
nvm_ls_current
return $?
fi
VERSION=`nvm_ls $PATTERN | tail -n1` VERSION=`nvm_ls $PATTERN | tail -n1`
echo "$VERSION" echo "$VERSION"