mirror of
				https://github.com/zsh-users/zsh-syntax-highlighting.git
				synced 2025-10-30 15:56:28 +08:00 
			
		
		
		
	'main': Don't match redirection operators in command substitutions as <-> number range globs. Fixes #483.
This commit is contained in:
		
							parent
							
								
									e2fb3243ea
								
							
						
					
					
						commit
						1c4ad6b6dc
					
				@ -822,7 +822,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
 | 
				
			|||||||
        elif [[ $arg[i+1] == [*@#?-$!] ]]; then
 | 
					        elif [[ $arg[i+1] == [*@#?-$!] ]]; then
 | 
				
			||||||
          (( i += 1 ))
 | 
					          (( i += 1 ))
 | 
				
			||||||
        fi;;
 | 
					        fi;;
 | 
				
			||||||
      [*?]*|\<*)
 | 
					      [*?]*|\<[0-9]#-[0-9]#\>)
 | 
				
			||||||
	# The '<' is for the <-> globbing syntax.  (This function doesn't get called on redirection tokens.)
 | 
						# The '<' is for the <-> globbing syntax.  (This function doesn't get called on redirection tokens.)
 | 
				
			||||||
        if $highlight_glob; then
 | 
					        if $highlight_glob; then
 | 
				
			||||||
          _zsh_highlight_main_add_region_highlight $start_pos $end_pos globbing
 | 
					          _zsh_highlight_main_add_region_highlight $start_pos $end_pos globbing
 | 
				
			||||||
 | 
				
			|||||||
@ -32,5 +32,5 @@ BUFFER=$': $(<foo)'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
expected_region_highlight=(
 | 
					expected_region_highlight=(
 | 
				
			||||||
  '1 1 builtin' # :
 | 
					  '1 1 builtin' # :
 | 
				
			||||||
  '3 9 default "issue #483"' # $(<foo)
 | 
					  '3 9 default' # $(<foo)
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user