Gracefully handle being sourced multiple times

Should fix #126
This commit is contained in:
Eric Freese 2017-02-17 22:50:11 -07:00
parent a0fcd81ce1
commit 75e850577d
2 changed files with 2 additions and 0 deletions

View file

@ -16,6 +16,7 @@ _zsh_autosuggest_bind_widget() {
# User-defined widget # User-defined widget
user:*) user:*)
zle -l "$prefix$widget" && zle -N "$widget" ${widgets[$prefix$widget]#*:}
zle -N $prefix$widget ${widgets[$widget]#*:} zle -N $prefix$widget ${widgets[$widget]#*:}
;; ;;

View file

@ -150,6 +150,7 @@ _zsh_autosuggest_bind_widget() {
# User-defined widget # User-defined widget
user:*) user:*)
zle -l "$prefix$widget" && zle -N "$widget" ${widgets[$prefix$widget]#*:}
zle -N $prefix$widget ${widgets[$widget]#*:} zle -N $prefix$widget ${widgets[$widget]#*:}
;; ;;