Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #172 on ZSH #175

Merged
merged 1 commit into from Dec 5, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion nvm.sh
Expand Up @@ -74,14 +74,15 @@ nvm_ls()
nvm_ls_remote()
{
local PATTERN=$1
local VERSIONS
if [ "$PATTERN" ]; then
if echo "${PATTERN}" | grep -v '^v' ; then
PATTERN=v$PATTERN
fi
else
PATTERN=".*"
fi
local VERSIONS=`curl -s http://nodejs.org/dist/ \
VERSIONS=`curl -s http://nodejs.org/dist/ \
| egrep -o 'v[0-9]+\.[0-9]+\.[0-9]+' \
| grep -w "${PATTERN}" \
| sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n`
Expand Down