Carefully rebind the $clean_event.

% bindkey "^I" complete-word
  % bi<TAB>

If we had not source the zsh-syntax-highlighting.zsh, it could
complete something. This is due to that `complete-word` will be
rebinded with 'zle -N $clean_event'.

Signed-off-by: Takeshi Banse <takebi@laafc.net>
This commit is contained in:
Takeshi Banse 2011-01-07 21:49:19 +09:00
parent 2fd0845b77
commit d2f641ca50

View File

@ -230,7 +230,13 @@ _zsh_highlight-install() {
;;
.*)
clean_event=$event[2,${#event}] # Remove the leading dot in the event name
eval "$clean_event() { builtin zle $event && _zsh_highlight-zle-buffer } ; zle -N $clean_event"
case ${widgets[$clean_event]-} in
(completion|user):*)
;;
*)
eval "$clean_event() { builtin zle $event && _zsh_highlight-zle-buffer } ; zle -N $clean_event"
;;
esac
;;
*)
;;