Browse Source

main: alias style overrides precommand style

pull/550/head
Matthew Martin 6 years ago
parent
commit
e3edddd8ec
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      highlighters/main/main-highlighter.zsh
  2. +1
    -1
      highlighters/main/test-data/noglob-alias.zsh

+ 1
- 1
highlighters/main/main-highlighter.zsh View File

@ -650,7 +650,7 @@ _zsh_highlight_main_highlighter_highlight_list()
next_word=':start:'
elif [[ $this_word == *':start:'* ]] && (( in_redirection == 0 )); then # $arg is the command word
if (( ${+precommand_options[$arg]} )) && _zsh_highlight_main__is_runnable $arg; then
style=precommand
[[ $res != alias ]] && style=precommand
flags_with_argument=${precommand_options[$arg]%:*}
flags_sans_argument=${precommand_options[$arg]#*:}
next_word=${next_word//:regular:/}

+ 1
- 1
highlighters/main/test-data/noglob-alias.zsh View File

@ -31,6 +31,6 @@ alias x=command
BUFFER='x ls'
expected_region_highlight=(
"1 1 precommand" # x
"1 1 alias" # x
"3 4 command" # ls
)

Loading…
Cancel
Save