mirror of
https://github.com/zsh-users/zsh-syntax-highlighting
synced 2025-01-05 10:19:30 +00:00
Issue 19: No duplicates in ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS
This commit is contained in:
parent
5958662772
commit
9f9e6c24c6
@ -159,7 +159,9 @@ _zsh_highlight-zle-buffer() {
|
||||
*': reserved') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[reserved-word];;
|
||||
*': alias') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[alias]
|
||||
local aliased_command=${"$(alias $arg)"#*=}
|
||||
[[ ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$aliased_command]:-}:+yes} = 'yes' ]] && ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS+=($arg)
|
||||
if [[ ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$aliased_command]:-}:+yes} = 'yes' && ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$arg]:-}:+yes} != 'yes' ]]; then
|
||||
ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS+=($arg)
|
||||
fi
|
||||
;;
|
||||
*': builtin') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[builtin];;
|
||||
*': function') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[function];;
|
||||
|
Loading…
Reference in New Issue
Block a user