mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2026-06-19 01:12:48 +02:00
main: highlight redirection targets as paths
This commit is contained in:
parent
1d85c69261
commit
99680ff695
2 changed files with 4 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
- Highlight `&>` `>&|` `>&!` `&>|` and `&>!` as redirection.
|
||||
[#942]
|
||||
- Highlight redirection targets as paths if possible [#982].
|
||||
|
||||
|
||||
# Changes in 0.8.0
|
||||
|
|
|
|||
|
|
@ -1441,6 +1441,9 @@ _zsh_highlight_main_highlighter_highlight_argument()
|
|||
if (( in_redirection )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
|
||||
if [[ $arg[$1,-1] == (p|-) ]]; then
|
||||
base_style=redirection
|
||||
if _zsh_highlight_main_highlighter_check_path $arg[$1,-1] 0; then
|
||||
base_style=$REPLY
|
||||
fi
|
||||
else
|
||||
base_style=numeric-fd
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue