Skip to content

Commit

Permalink
WIP: 'main': Add some in_param/in_alias checks by code inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
danielshahaf committed Mar 28, 2020
1 parent 78f40ee commit d0a11ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion highlighters/main/main-highlighter.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,9 @@ _zsh_highlight_main_highlighter_check_assign()

_zsh_highlight_main_highlighter_highlight_path_separators()
{
if (( in_param || in_alias )); then
return
fi
local pos style_pathsep
style_pathsep=$1_pathseparator
reply=()
Expand Down Expand Up @@ -1386,7 +1389,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
done

if (( path_eligible )); then
if (( in_redirection )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
if (( in_redirection && ! in_param )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
if [[ $arg[$1,-1] == (p|-) ]]; then
base_style=redirection
else
Expand Down

0 comments on commit d0a11ba

Please sign in to comment.