minor: 'main': Only search for prefixes if :h is a directory
This commit is contained in:
		
							parent
							
								
									f060622dc6
								
							
						
					
					
						commit
						91fa057a39
					
				|  | @ -580,7 +580,7 @@ _zsh_highlight_main_highlighter_check_path() | ||||||
|   done |   done | ||||||
| 
 | 
 | ||||||
|   # If dirname($arg) doesn't exist, neither does $arg. |   # If dirname($arg) doesn't exist, neither does $arg. | ||||||
|   [[ ! -e ${expanded_path:h} ]] && return 1 |   [[ ! -d ${expanded_path:h} ]] && return 1 | ||||||
| 
 | 
 | ||||||
|   # If this word ends the buffer, check if it's the prefix of a valid path. |   # If this word ends the buffer, check if it's the prefix of a valid path. | ||||||
|   if [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos ]] && |   if [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos ]] && | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue