main: highlight redirection targets as paths
This commit is contained in:
parent
1d85c69261
commit
99680ff695
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
- Highlight `&>` `>&|` `>&!` `&>|` and `&>!` as redirection.
|
- Highlight `&>` `>&|` `>&!` `&>|` and `&>!` as redirection.
|
||||||
[#942]
|
[#942]
|
||||||
|
- Highlight redirection targets as paths if possible [#982].
|
||||||
|
|
||||||
|
|
||||||
# Changes in 0.8.0
|
# 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 (( in_redirection )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
|
||||||
if [[ $arg[$1,-1] == (p|-) ]]; then
|
if [[ $arg[$1,-1] == (p|-) ]]; then
|
||||||
base_style=redirection
|
base_style=redirection
|
||||||
|
if _zsh_highlight_main_highlighter_check_path $arg[$1,-1] 0; then
|
||||||
|
base_style=$REPLY
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
base_style=numeric-fd
|
base_style=numeric-fd
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue