main: highlight redirection targets as paths

This commit is contained in:
Ben Boeckel 2026-06-13 01:10:42 -04:00
commit 99680ff695
2 changed files with 4 additions and 0 deletions

View file

@ -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