Define a style for hashed commands
This commit is contained in:
parent
a7746077bf
commit
60842aa75b
@ -18,6 +18,7 @@ ZSH_HIGHLIGHT_STYLES=(
|
|||||||
builtin 'fg=green'
|
builtin 'fg=green'
|
||||||
function 'fg=green'
|
function 'fg=green'
|
||||||
command 'fg=green'
|
command 'fg=green'
|
||||||
|
hashed-command 'fg=green'
|
||||||
path 'underline'
|
path 'underline'
|
||||||
globbing 'fg=blue'
|
globbing 'fg=blue'
|
||||||
history-expansion 'fg=blue'
|
history-expansion 'fg=blue'
|
||||||
@ -130,7 +131,7 @@ _zsh_highlight-zle-buffer() {
|
|||||||
*': builtin') style=$ZSH_HIGHLIGHT_STYLES[builtin];;
|
*': builtin') style=$ZSH_HIGHLIGHT_STYLES[builtin];;
|
||||||
*': function') style=$ZSH_HIGHLIGHT_STYLES[function];;
|
*': function') style=$ZSH_HIGHLIGHT_STYLES[function];;
|
||||||
*': command') style=$ZSH_HIGHLIGHT_STYLES[command];;
|
*': command') style=$ZSH_HIGHLIGHT_STYLES[command];;
|
||||||
*': hashed') style=$ZSH_HIGHLIGHT_STYLES[command];;
|
*': hashed') style=$ZSH_HIGHLIGHT_STYLES[hashed-command];;
|
||||||
*) if _zsh_check-path; then
|
*) if _zsh_check-path; then
|
||||||
style=$ZSH_HIGHLIGHT_STYLES[path]
|
style=$ZSH_HIGHLIGHT_STYLES[path]
|
||||||
elif [[ $arg[0,1] = $histchars[0,1] ]]; then
|
elif [[ $arg[0,1] = $histchars[0,1] ]]; then
|
||||||
@ -170,10 +171,7 @@ _zsh_highlight-zle-buffer() {
|
|||||||
# Bracket matching
|
# Bracket matching
|
||||||
bracket_color_size=${#ZSH_MATCHING_BRACKETS}
|
bracket_color_size=${#ZSH_MATCHING_BRACKETS}
|
||||||
if ((bracket_color_size > 0)); then
|
if ((bracket_color_size > 0)); then
|
||||||
typeset -A levelpos
|
typeset -A levelpos lastoflevel matching revmatching
|
||||||
typeset -A lastoflevel
|
|
||||||
typeset -A matching
|
|
||||||
typeset -A revmatching
|
|
||||||
((level = 0))
|
((level = 0))
|
||||||
for pos in {1..${#BUFFER}}; do
|
for pos in {1..${#BUFFER}}; do
|
||||||
case $BUFFER[pos] in
|
case $BUFFER[pos] in
|
||||||
|
Loading…
Reference in New Issue
Block a user