From 3b27ad778d3d66027165a5bb281ed03e064bbc77 Mon Sep 17 00:00:00 2001 From: Julien Nicoulaud Date: Mon, 25 Jul 2011 22:30:06 +0200 Subject: [PATCH] More efficient way to strip leading dot --- zsh-syntax-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 674aaf2..c830e92 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -145,7 +145,7 @@ for event in ${${(f)"$(zle -la)"}:#(_*|orig-*|.run-help|.which-command|.beep)}; eval "$event() { builtin zle .$event && _zsh_highlight } ; zle -N $event" ;; .*) - clean_event=$event[2,${#event}] # Remove the leading dot in the event name + clean_event=${event#\.} case ${widgets[$clean_event]-} in (completion|user):*) ;;