mirror of
				https://github.com/zsh-users/zsh-syntax-highlighting.git
				synced 2025-10-31 10:04:31 +00:00 
			
		
		
		
	
							parent
							
								
									8d4cde6301
								
							
						
					
					
						commit
						024c1c46f7
					
				| @ -153,11 +153,12 @@ _zsh_highlight_main_highlighter_check_assign() | ||||
| # Check if the argument is a path. | ||||
| _zsh_highlight_main_highlighter_check_path() | ||||
| { | ||||
|   setopt nonomatch | ||||
|   local expanded_path; : ${expanded_path:=${(Q)~arg}} | ||||
|   [[ -z "$expanded_path" ]] && return 1 | ||||
|   [[ -e "$expanded_path" ]] && return 0 | ||||
|   [[ ! -e "${expanded_path:h}" ]] && return 1 | ||||
|   [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos && -n $(print "${expanded_path}"*(N)) ]] && return 0 | ||||
|   [[ -z $expanded_path ]] && return 1 | ||||
|   [[ -e $expanded_path ]] && return 0 | ||||
|   [[ ! -e ${expanded_path:h} ]] && return 1 | ||||
|   [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos && -n $(print ${expanded_path}*(N)) ]] && return 0 | ||||
|   return 1 | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Andreas Gahr
						Andreas Gahr