mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
'main': Support the "close file descriptor" and "coproc" redirection syntaxes
Part of issue #645.
This commit is contained in:
parent
10171731f3
commit
fdf23e06c7
2 changed files with 8 additions and 4 deletions
|
|
@ -1287,8 +1287,12 @@ _zsh_highlight_main_highlighter_highlight_argument()
|
|||
done
|
||||
|
||||
if (( path_eligible )); then
|
||||
if (( in_redirection )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == <0-> ]]; then
|
||||
base_style=numeric-fd
|
||||
if (( in_redirection )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
|
||||
if [[ $arg[$1,-1] == (p|-) ]]; then
|
||||
base_style=redirection
|
||||
else
|
||||
base_style=numeric-fd
|
||||
fi
|
||||
elif _zsh_highlight_main_highlighter_check_path $arg[$1,-1]; then
|
||||
base_style=$REPLY
|
||||
_zsh_highlight_main_highlighter_highlight_path_separators $base_style
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue