mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Fix #172 on ZSH
This commit is contained in:
		
							
								
								
									
										3
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								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` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user