Skip to content
Myr

Fixing `nvm ls 0.x` to only include `0.x.*` instead of `0.x*.*`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 802f064 · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:nvm.sh+5 added-1 removed
156 unmodified lines
157 if [ -d "$NVM_DIR/$PATTERN" ]; then158 VERSIONS="$PATTERN"159 fi160 else161 PATTERN=$(nvm_format_version $PATTERN)162 if [ `expr "$PATTERN" : "v[[:digit:]]*\.[[:digit:]]*$"` != 0 ]; then163 PATTERN="$PATTERN."164 fi161 VERSIONS=`find "$NVM_DIR/" -maxdepth 1 -type d -name "$(nvm_format_version $PATTERN)*" -exec basename '{}' ';' \165 VERSIONS=`find "$NVM_DIR/" -maxdepth 1 -type d -name "$PATTERN*" -exec basename '{}' ';' \166 | sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n | \grep -v '^ *\.'`167 fi168 if [ -z "$VERSIONS" ]; then169 echo "N/A"
521 unmodified lines