mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 13:07:13 +00:00 
			
		
		
		
	always list installed versions
This commit is contained in:
		
							parent
							
								
									48fe276e36
								
							
						
					
					
						commit
						37811e0d7d
					
				
							
								
								
									
										17
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								nvm.sh
									
									
									
									
									
								
							| @ -1905,14 +1905,11 @@ BEGIN { | |||||||
|   split(remote_versions, lines, "|"); |   split(remote_versions, lines, "|"); | ||||||
|   split(installed_versions, installed, "|"); |   split(installed_versions, installed, "|"); | ||||||
|   rows = alen(lines); |   rows = alen(lines); | ||||||
|   filter = (min_ver != "v0"); |   filter_on = (vcmp("v0.0.0", min_ver) != 0); | ||||||
|   for (m = n = 1; n <= rows; n++) { |   for (m = n = 1; n <= rows; n++) { | ||||||
|     split(lines[n], fields, "[[:blank:]]+"); |     split(lines[n], fields, "[[:blank:]]+"); | ||||||
|     cols = alen(fields); |     cols = alen(fields); | ||||||
|     version = fields[1]; |     version = fields[1]; | ||||||
|     if (filter && comp(version, min_ver) < 0) continue; |  | ||||||
| 
 |  | ||||||
|     filter = 0; |  | ||||||
|     is_installed = 0; |     is_installed = 0; | ||||||
|     for (i in installed) { |     for (i in installed) { | ||||||
|       if (version == installed[i]) { |       if (version == installed[i]) { | ||||||
| @ -1921,6 +1918,14 @@ BEGIN { | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     if (filter_on && !is_installed) { | ||||||
|  |       if (vcmp(version, min_ver) >= 0) { | ||||||
|  |         filter_on = 0; | ||||||
|  |       } else { | ||||||
|  |         continue; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     fmt_version = "%15s"; |     fmt_version = "%15s"; | ||||||
|     if (version == current) { |     if (version == current) { | ||||||
|       fmt_version = fmt_current; |       fmt_version = fmt_current; | ||||||
| @ -1942,8 +1947,8 @@ BEGIN { | |||||||
|     output[m++] = formatted; |     output[m++] = formatted; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   for (m in output) { |   for (n = 1; n < m; n++) { | ||||||
|     print output[m] |     print output[n] | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   exit |   exit | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 ryenus
						ryenus