Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

nvm_ls minor versions #466

Merged
merged 3 commits into from Jul 13, 2014

Conversation

Projects
None yet
2 participants
Collaborator

ljharb commented Jul 11, 2014

Fixes #401.

@koenpunt koenpunt and 1 other commented on an outdated diff Jul 12, 2014

@@ -158,7 +158,11 @@ nvm_ls() {
VERSIONS="$PATTERN"
fi
else
- VERSIONS=`find "$NVM_DIR/" -maxdepth 1 -type d -name "$(nvm_format_version $PATTERN)*" -exec basename '{}' ';' \
+ PATTERN=$(nvm_format_version $PATTERN)
+ if [ `expr "$PATTERN" : "v[[:digit:]]*\.[[:digit:]]]*$"` != 0 ]; then
@koenpunt

koenpunt Jul 12, 2014

Contributor

Strange that this works, there is a ] too many: `.[[:digit:]]]*$"``

@koenpunt

koenpunt Jul 12, 2014

Contributor

And is there a reason we use [[:digit:]] and not [0-9]?

@ljharb

ljharb Jul 12, 2014

Collaborator

hm - good call. perhaps because of the *?

It's because that's what's used already in the file, 6 lines higher.

@koenpunt

koenpunt Jul 12, 2014

Contributor

I know that it has been used before, but I just tested the [0-9] in the different shells and it doesn't make a difference. So maybe update both to [0-9]?

@ljharb

ljharb Jul 12, 2014

Collaborator

Updated.

@ljharb ljharb added a commit that referenced this pull request Jul 12, 2014

@ljharb ljharb Use [0-9] instead of [[:digit:]] per #466 (comment) - it's simpler (a…
…nd probably more portable).
11e3531

@ljharb ljharb added a commit that referenced this pull request Jul 13, 2014

@ljharb ljharb Merge pull request #466 from creationix/nvm_ls_minor_versions
nvm_ls minor versions
1a9ab82

@ljharb ljharb merged commit 1a9ab82 into master Jul 13, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@ljharb ljharb referenced this pull request in travis-ci/travis-images Jul 30, 2014

@joshk joshk remove most node js aliases
these are recognized by default by NVM

<3<3<3 @ljharb
6ec39db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment