mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-04-17 11:35:32 +08:00
fixup! 'main': Fix highlighting of «<->»-style numeric globs.
This commit is contained in:
parent
07e2c7ceea
commit
35270f7c97
@ -163,7 +163,7 @@ _zsh_highlight_main__is_redirection() {
|
|||||||
# - then, has a '<' or '>' character;
|
# - then, has a '<' or '>' character;
|
||||||
# - is not a process substitution [<(...) or >(...)].
|
# - is not a process substitution [<(...) or >(...)].
|
||||||
# - is not a numeric glob <->
|
# - is not a numeric glob <->
|
||||||
[[ $1 == (<0-9>|)(\<|\>)* ]] && [[ $1 != (\<|\>)$'\x28'* ]] && [[ $1 != '<'*'-'*'>' ]]
|
[[ $1 == (<0-9>|)(\<|\>)* ]] && [[ $1 != (\<|\>)$'\x28'* ]] && [[ $1 != *'<'*'-'*'>'* ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Resolve alias.
|
# Resolve alias.
|
||||||
@ -683,7 +683,7 @@ _zsh_highlight_highlighter_main_paint()
|
|||||||
;;
|
;;
|
||||||
'`'*) style=back-quoted-argument;;
|
'`'*) style=back-quoted-argument;;
|
||||||
[$][*]) style=default;;
|
[$][*]) style=default;;
|
||||||
[*?]*|*[^\\][*?]*|'<'*'-'*'>')
|
[*?]*|*[^\\][*?]*|*'<'*'-'*'>'*)
|
||||||
$highlight_glob && style=globbing || style=default;;
|
$highlight_glob && style=globbing || style=default;;
|
||||||
*) if false; then
|
*) if false; then
|
||||||
elif [[ $arg = $'\x7d' ]] && $right_brace_is_recognised_everywhere; then
|
elif [[ $arg = $'\x7d' ]] && $right_brace_is_recognised_everywhere; then
|
||||||
|
@ -28,9 +28,10 @@
|
|||||||
# vim: ft=zsh sw=2 ts=2 et
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
BUFFER=$'print <->'
|
BUFFER=$'print <-> 0<->'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 5 builtin' # print
|
'1 5 builtin' # print
|
||||||
'7 9 globbing' # <->
|
'7 9 globbing' # <->
|
||||||
|
'11 14 globbing' # 0<->
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user