From d2f641ca50c792df09226b9cca3c0e66dc5dde9c Mon Sep 17 00:00:00 2001 From: Takeshi Banse Date: Fri, 7 Jan 2011 21:49:19 +0900 Subject: [PATCH] Carefully rebind the $clean_event. % bindkey "^I" complete-word % bi 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 --- zsh-syntax-highlighting.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 957684a..5ce9e92 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -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 ;; *) ;;