Issue 12: Highlight isearch like fish

Bind highlighting to more history navigation ZLE events
This commit is contained in:
Julien Nicoulaud 2010-12-31 14:35:38 +01:00
parent a56a085ca7
commit c19bef7714

View File

@ -9,6 +9,8 @@
typeset -A ZSH_SYNTAX_HIGHLIGHTING_STYLES
ZSH_SYNTAX_HIGHLIGHTING_STYLES=(
default 'none'
isearch 'fg=magenta,standout'
special 'fg=magenta,standout'
unknown-token 'fg=red,bold'
reserved-word 'fg=yellow,bold'
alias 'fg=green,bold'
@ -44,25 +46,64 @@ ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS=(
# ZLE events that trigger an update of the highlighting.
ZSH_HIGHLIGHT_ZLE_UPDATE_EVENTS=(
self-insert
magic-space
delete-char
delete-char-or-list
backward-delete-char
kill-word
backward-kill-word
up-line-or-history
down-line-or-history
beginning-of-history
end-of-history
accept-and-hold
accept-and-infer-next-history
accept-line
accept-line-and-down-history
undo
redo
yank
backward-delete-char
backward-delete-word
backward-kill-word
beginning-of-buffer-or-history
beginning-of-history
beginning-of-history
beginning-of-line-hist
complete-word
delete-char
delete-char-or-list
down-history
down-line-or-history
down-line-or-history
down-line-or-search
end-of-buffer-or-history
end-of-history
end-of-line-hist
expand-or-complete
expand-or-complete-prefix
history-beginning-search-backward
history-beginning-search-forward
history-incremental-search-backward
history-incremental-search-forward
history-search-backward
history-search-forward
infer-next-history
insert-last-word
kill-word
magic-space
quoted-insert
redo
self-insert
undo
up-history
up-line-or-history
up-line-or-history
up-line-or-search
up-line-or-search
vi-backward-kill-word
vi-down-line-or-history
vi-fetch-history
vi-history-search-backward
vi-history-search-forward
vi-quoted-insert
vi-repeat-search
vi-rev-repeat-search
vi-up-line-or-history
yank
)
# ZLE highlight types.
zle_highlight=(
special:$ZSH_SYNTAX_HIGHLIGHTING_STYLES[special]
isearch:$ZSH_SYNTAX_HIGHLIGHTING_STYLES[isearch]
)
# Check if the argument is a path.