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?)

This commit is contained in:
jimmijj 2014-10-03 13:17:52 +00:00
parent 4a82aab578
commit 6d9a34065c

View File

@ -209,7 +209,7 @@ _zsh_highlight_main_highlighter_check_path()
(( $#tmp > 0 )) && style_override=path_prefix && return 0
# or maybe an approximate path?
tmp=( (#a1)${expanded_path}*(N) )
(( $#tmp > 0 )) && style_override=path_approx && return 0
(( $#arg > 3 && $#tmp > 0 )) && style_override=path_approx && return 0
fi
return 1
}