Merge pull request #175 from Marsup/fix-172

Fix #172 on ZSH
master
Tim Caswell 2012-12-04 17:45:25 -08:00
commit 9c3af112ca
1 changed files with 2 additions and 1 deletions

3
nvm.sh
View File

@ -74,6 +74,7 @@ nvm_ls()
nvm_ls_remote()
{
local PATTERN=$1
local VERSIONS
if [ "$PATTERN" ]; then
if echo "${PATTERN}" | grep -v '^v' ; then
PATTERN=v$PATTERN
@ -81,7 +82,7 @@ nvm_ls_remote()
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`