(Hopefully) fix #21 (tilde and hashed directories in paths)
This commit is contained in:
		
							parent
							
								
									db8f98fc53
								
							
						
					
					
						commit
						8d4cde6301
					
				|  | @ -153,10 +153,11 @@ _zsh_highlight_main_highlighter_check_assign() | ||||||
| # Check if the argument is a path. | # Check if the argument is a path. | ||||||
| _zsh_highlight_main_highlighter_check_path() | _zsh_highlight_main_highlighter_check_path() | ||||||
| { | { | ||||||
|   [[ -z "${(Q)~arg}" ]] && return 1 |   local expanded_path; : ${expanded_path:=${(Q)~arg}} | ||||||
|   [[ -e "${(Q)~arg}" ]] && return 0 |   [[ -z "$expanded_path" ]] && return 1 | ||||||
|   [[ ! -e "${(Q)~arg:h}" ]] && return 1 |   [[ -e "$expanded_path" ]] && return 0 | ||||||
|   [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos && -n $(print "${(Q)~arg}"*(N)) ]] && return 0 |   [[ ! -e "${expanded_path:h}" ]] && return 1 | ||||||
|  |   [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos && -n $(print "${expanded_path}"*(N)) ]] && return 0 | ||||||
|   return 1 |   return 1 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue