From 266284006408094065e8f5fceb4ee7bc602e97ff Mon Sep 17 00:00:00 2001 From: Marsup Date: Tue, 27 Nov 2012 23:46:04 +0100 Subject: [PATCH] Fix #172 on ZSH --- nvm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index bc42df2..45a39ce 100755 --- a/nvm.sh +++ b/nvm.sh @@ -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`