diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index c6ce7e8..37de2cc 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -498,16 +498,6 @@ _zsh_highlight_main_highlighter_highlight_list() continue fi - # Analyse the current word. - if _zsh_highlight_main__is_redirection $arg ; then - if (( in_redirection )); then - _zsh_highlight_main_add_region_highlight $start_pos $end_pos unknown-token - already_added=1 - else - in_redirection=2 - fi - fi - # Expand aliases. # TODO: this should be done iteratively, e.g., 'alias x=y y=z z=w\n x' # And then the entire 'alias' branch of the 'case' statement should @@ -529,6 +519,16 @@ _zsh_highlight_main_highlighter_highlight_list() } fi + # Analyse the current word. + if _zsh_highlight_main__is_redirection $arg ; then + if (( in_redirection )); then + _zsh_highlight_main_add_region_highlight $start_pos $end_pos unknown-token + already_added=1 + else + in_redirection=2 + fi + fi + # Expand parameters. # # ### For now, expand just '$foo' or '${foo}', possibly with braces, but with