mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Supress ZSH "no matches found" error
Fixes issue #39 ZSH's default globbing behaviour differs from Bash. If there is no match, ZSH itself will print the error message. This means that piping a commantd's STDERR to /dev/null will not hide it. By unsetting the NOMATCH option we get a behaviour similar to Bash. Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
This commit is contained in:
		
							
								
								
									
										4
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -10,6 +10,10 @@ if [ ! -d "$NVM_DIR" ]; then | |||||||
|     export NVM_DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0}) && pwd) |     export NVM_DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0}) && pwd) | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | # Make zsh glob matching behave same as bash | ||||||
|  | # This fixes the "zsh: no matches found" errors | ||||||
|  | unsetopt nomatch 2>/dev/null | ||||||
|  |  | ||||||
| # Expand a version using the version cache | # Expand a version using the version cache | ||||||
| nvm_version() | nvm_version() | ||||||
| { | { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user