Skip to content

Commit d0a11ba

Browse files
committed
WIP: 'main': Add some in_param/in_alias checks by code inspection
1 parent 78f40ee commit d0a11ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

highlighters/main/main-highlighter.zsh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,9 @@ _zsh_highlight_main_highlighter_check_assign()
11411141

11421142
_zsh_highlight_main_highlighter_highlight_path_separators()
11431143
{
1144+
if (( in_param || in_alias )); then
1145+
return
1146+
fi
11441147
local pos style_pathsep
11451148
style_pathsep=$1_pathseparator
11461149
reply=()
@@ -1386,7 +1389,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
13861389
done
13871390

13881391
if (( path_eligible )); then
1389-
if (( in_redirection )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
1392+
if (( in_redirection && ! in_param )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
13901393
if [[ $arg[$1,-1] == (p|-) ]]; then
13911394
base_style=redirection
13921395
else

0 commit comments

Comments
 (0)