Skip to content

Commit 6d9a340

Browse files
committed
Add condition that path_approx should be highlighted only if $#arg > 3, otherwise it matches too many things. (but do we need path_approx at all?)
1 parent 4a82aab commit 6d9a340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

highlighters/main/main-highlighter.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ _zsh_highlight_main_highlighter_check_path()
209209
(( $#tmp > 0 )) && style_override=path_prefix && return 0
210210
# or maybe an approximate path?
211211
tmp=( (#a1)${expanded_path}*(N) )
212-
(( $#tmp > 0 )) && style_override=path_approx && return 0
212+
(( $#arg > 3 && $#tmp > 0 )) && style_override=path_approx && return 0
213213
fi
214214
return 1
215215
}

0 commit comments

Comments
 (0)