mirror of
				https://github.com/zsh-users/zsh-syntax-highlighting.git
				synced 2025-10-31 18:15:49 +00:00 
			
		
		
		
	Support the '|&', '&!', '&|' command separators.
This commit is contained in:
		
							parent
							
								
									3ed0f7f823
								
							
						
					
					
						commit
						29fd6ec1de
					
				| @ -125,6 +125,10 @@ _zsh_highlight_main_highlighter() | |||||||
| 
 | 
 | ||||||
|   ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR=( |   ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR=( | ||||||
|     '|' '||' ';' '&' '&&' |     '|' '||' ';' '&' '&&' | ||||||
|  |     '|&' | ||||||
|  |     '&!' '&|' | ||||||
|  |     # ### 'case' syntax, but followed by a pattern, not by a command | ||||||
|  |     # ';;' ';&' ';|' | ||||||
|   ) |   ) | ||||||
|   ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS=( |   ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS=( | ||||||
|     'builtin' 'command' 'exec' 'nocorrect' 'noglob' |     'builtin' 'command' 'exec' 'nocorrect' 'noglob' | ||||||
|  | |||||||
| @ -29,9 +29,11 @@ | |||||||
| 
 | 
 | ||||||
| ZSH_HIGHLIGHT_STYLES[commandseparator]=$unused_highlight | ZSH_HIGHLIGHT_STYLES[commandseparator]=$unused_highlight | ||||||
| 
 | 
 | ||||||
| BUFFER=':; pwd' | BUFFER=':; pwd &! ls' | ||||||
| 
 | 
 | ||||||
| expected_region_highlight=( | expected_region_highlight=( | ||||||
|   "2 2 $ZSH_HIGHLIGHT_STYLES[commandseparator]" # ; |   "2 2 $ZSH_HIGHLIGHT_STYLES[commandseparator]" # ; | ||||||
|   "4 6 $ZSH_HIGHLIGHT_STYLES[builtin]" # pwd |   "4 6 $ZSH_HIGHLIGHT_STYLES[builtin]" # pwd | ||||||
|  |   "8 9 $ZSH_HIGHLIGHT_STYLES[commandseparator]" # &! | ||||||
|  |   "11 12 $ZSH_HIGHLIGHT_STYLES[command]" # ls | ||||||
| ) | ) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Daniel Shahaf
						Daniel Shahaf