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

Fix #172 on ZSH #175

Merged
merged 1 commit into from Dec 5, 2012
Jump to file or symbol
Failed to load files and symbols.
+2 −1
Split
View
3 nvm.sh
@@ -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`