Browse Source

main: Do path expanstion after alias expansion

pull/550/head
Matthew Martin 6 years ago
parent
commit
e1ecf950e2
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      highlighters/main/main-highlighter.zsh

+ 7
- 3
highlighters/main/main-highlighter.zsh View File

@ -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.

Loading…
Cancel
Save