main: Only expand aliases in command position

This commit is contained in:
Matthew Martin 2018-03-25 21:42:36 -05:00
parent 99d7235c2b
commit f46b148c52

View File

@ -498,6 +498,7 @@ _zsh_highlight_main_highlighter_highlight_list()
continue continue
fi fi
if [[ $this_word == *:start:* ]] && ! (( in_redirection )); then
# Expand aliases. # Expand aliases.
# TODO: this should be done iteratively, e.g., 'alias x=y y=z z=w\n x' # 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 # And then the entire 'alias' branch of the 'case' statement should
@ -518,6 +519,7 @@ _zsh_highlight_main_highlighter_highlight_list()
arg=$reply[1] arg=$reply[1]
} }
fi fi
fi
# Analyse the current word. # Analyse the current word.
if _zsh_highlight_main__is_redirection $arg ; then if _zsh_highlight_main__is_redirection $arg ; then