|
|
@ -153,13 +153,13 @@ nvm_ls() { |
|
|
|
return |
|
|
|
return |
|
|
|
fi |
|
|
|
fi |
|
|
|
# If it looks like an explicit version, don't do anything funny |
|
|
|
# If it looks like an explicit version, don't do anything funny |
|
|
|
if [ `expr "$PATTERN" : "v[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*$"` != 0 ]; then |
|
|
|
if [ `expr "$PATTERN" : "v[0-9]*\.[0-9]*\.[0-9]*$"` != 0 ]; then |
|
|
|
if [ -d "$NVM_DIR/$PATTERN" ]; then |
|
|
|
if [ -d "$NVM_DIR/$PATTERN" ]; then |
|
|
|
VERSIONS="$PATTERN" |
|
|
|
VERSIONS="$PATTERN" |
|
|
|
fi |
|
|
|
fi |
|
|
|
else |
|
|
|
else |
|
|
|
PATTERN=$(nvm_format_version $PATTERN) |
|
|
|
PATTERN=$(nvm_format_version $PATTERN) |
|
|
|
if [ `expr "$PATTERN" : "v[[:digit:]]*\.[[:digit:]]*$"` != 0 ]; then |
|
|
|
if [ `expr "$PATTERN" : "v[0-9]*\.[0-9]*$"` != 0 ]; then |
|
|
|
PATTERN="$PATTERN." |
|
|
|
PATTERN="$PATTERN." |
|
|
|
fi |
|
|
|
fi |
|
|
|
VERSIONS=`find "$NVM_DIR/" -maxdepth 1 -type d -name "$PATTERN*" -exec basename '{}' ';' \ |
|
|
|
VERSIONS=`find "$NVM_DIR/" -maxdepth 1 -type d -name "$PATTERN*" -exec basename '{}' ';' \ |
|
|
|