mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-02-13 10:05:31 +08:00
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:
parent
4a82aab578
commit
6d9a34065c
@ -209,7 +209,7 @@ _zsh_highlight_main_highlighter_check_path()
|
|||||||
(( $#tmp > 0 )) && style_override=path_prefix && return 0
|
(( $#tmp > 0 )) && style_override=path_prefix && return 0
|
||||||
# or maybe an approximate path?
|
# or maybe an approximate path?
|
||||||
tmp=( (#a1)${expanded_path}*(N) )
|
tmp=( (#a1)${expanded_path}*(N) )
|
||||||
(( $#tmp > 0 )) && style_override=path_approx && return 0
|
(( $#arg > 3 && $#tmp > 0 )) && style_override=path_approx && return 0
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user