mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2026-01-22 22:45:36 +01:00
Fix part of issue #238, "fd redirections at command word".
This fixes fd's specified by a (single) digit. The named fd syntax remains an XFail.
This commit is contained in:
parent
48ecd29180
commit
73ee7c1f6c
2 changed files with 5 additions and 4 deletions
|
|
@ -320,7 +320,8 @@ _zsh_highlight_main_highlighter()
|
|||
else
|
||||
style=$ZSH_HIGHLIGHT_STYLES[unknown-token]
|
||||
fi
|
||||
elif [[ $arg[1] == '<' || $arg[1] == '>' ]]; then
|
||||
elif [[ $arg == (<0-9>|)(\<|\>)* ]]; then
|
||||
# A '<' or '>', possibly followed by a digit
|
||||
style=$ZSH_HIGHLIGHT_STYLES[redirection]
|
||||
(( in_redirection=2 ))
|
||||
elif [[ $arg[1,2] == '((' ]]; then
|
||||
|
|
@ -389,7 +390,7 @@ _zsh_highlight_main_highlighter()
|
|||
else
|
||||
style=$ZSH_HIGHLIGHT_STYLES[unknown-token]
|
||||
fi
|
||||
elif [[ $arg[1] == '<' || $arg[1] == '>' ]]; then
|
||||
elif [[ $arg == (<0-9>|)(\<|\>)* ]]; then
|
||||
style=$ZSH_HIGHLIGHT_STYLES[redirection]
|
||||
(( in_redirection=2 ))
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue