More efficient way to strip leading dot

This commit is contained in:
Julien Nicoulaud 2011-07-25 22:30:06 +02:00
parent 9617f6e61b
commit 3b27ad778d

View File

@ -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):*)
;;