浏览代码

main: Do path expanstion after alias expansion

pull/550/head
Matthew Martin 6 年前
父节点
当前提交
e1ecf950e2
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. +7
    -3
      highlighters/main/main-highlighter.zsh

+ 7
- 3
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.

正在加载...
取消
保存