diff --git a/nvm.sh b/nvm.sh index cc7a7a8..4f0c991 100755 --- a/nvm.sh +++ b/nvm.sh @@ -93,7 +93,7 @@ nvm_ls() { return fi # If it looks like an explicit version, don't do anything funny - if [ `expr "$PATTERN" : "v.*.\?.*.\?.*$"` != 0 ]; then + if [ `expr "$PATTERN" : "v[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*$"` != 0 ]; then VERSIONS="$PATTERN" else VERSIONS=`find "$NVM_DIR/" -maxdepth 1 -type d -name "v$PATTERN*" -exec basename '{}' ';' \