diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 663913a..3a8419f 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -503,9 +503,7 @@ _zsh_highlight_main_highlighter_highlight_list() # 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 # be done here. - # TODO: path expansion should happen _after_ alias expansion - _zsh_highlight_main_highlighter_expand_path $arg - _zsh_highlight_main__type "$REPLY" + _zsh_highlight_main__type "$arg" local res="$REPLY" if [[ $res == "alias" ]]; then _zsh_highlight_main__resolve_alias $arg @@ -519,6 +517,12 @@ _zsh_highlight_main_highlighter_highlight_list() arg=$reply[1] } fi + _zsh_highlight_main_highlighter_expand_path $arg + arg=$REPLY + if [[ $res != alias ]]; then + _zsh_highlight_main__type "$arg" + res="$REPLY" + fi fi # Analyse the current word.