mirror of
				https://github.com/zsh-users/zsh-syntax-highlighting.git
				synced 2025-10-30 15:56:28 +08:00 
			
		
		
		
	command word: Protect against the case that the command word starts with a minus.
This commit is contained in:
		
							parent
							
								
									07fd773d7e
								
							
						
					
					
						commit
						e138cfd765
					
				| @ -159,7 +159,7 @@ _zsh_highlight_main_highlighter() | |||||||
|      else |      else | ||||||
|       _zsh_highlight_main_highlighter_expand_path $arg |       _zsh_highlight_main_highlighter_expand_path $arg | ||||||
|       local expanded_arg="$REPLY" |       local expanded_arg="$REPLY" | ||||||
|       local res="$(LC_ALL=C builtin type -w ${expanded_arg} 2>/dev/null)" |       local res="$(LC_ALL=C builtin type -w -- ${expanded_arg} 2>/dev/null)" | ||||||
|       case $res in |       case $res in | ||||||
|         *': reserved')  style=$ZSH_HIGHLIGHT_STYLES[reserved-word];; |         *': reserved')  style=$ZSH_HIGHLIGHT_STYLES[reserved-word];; | ||||||
|         *': suffix alias') |         *': suffix alias') | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Shahaf
						Daniel Shahaf