default $PATTERN to "v" correctly

This commit is contained in:
Marcin Jekot 2014-05-19 17:28:35 +02:00
parent f691cea416
commit 480f580866

2
nvm.sh
View File

@ -117,7 +117,7 @@ nvm_binary_available() {
} }
nvm_ls() { nvm_ls() {
local PATTERN=`expr "$1" : "v"` local PATTERN=${1:-v}
local VERSIONS='' local VERSIONS=''
if [ "$PATTERN" = 'current' ]; then if [ "$PATTERN" = 'current' ]; then
echo `node -v 2>/dev/null` echo `node -v 2>/dev/null`