2016-02-05 15:14:08 -07:00
|
|
|
|
2016-02-14 00:29:43 -07:00
|
|
|
#--------------------------------------------------------------------#
|
|
|
|
|
# Start #
|
|
|
|
|
#--------------------------------------------------------------------#
|
2016-02-05 15:14:08 -07:00
|
|
|
|
|
|
|
|
# Start the autosuggestion widgets
|
2016-02-07 14:21:57 -07:00
|
|
|
_zsh_autosuggest_start() {
|
2017-02-18 10:47:53 -07:00
|
|
|
add-zsh-hook -d precmd _zsh_autosuggest_start
|
|
|
|
|
|
2016-02-05 15:14:08 -07:00
|
|
|
_zsh_autosuggest_bind_widgets
|
2017-01-26 16:37:42 -07:00
|
|
|
|
2017-02-18 10:47:53 -07:00
|
|
|
# Re-bind widgets on every precmd to ensure we wrap other wrappers.
|
|
|
|
|
# Specifically, highlighting breaks if our widgets are wrapped by
|
|
|
|
|
# zsh-syntax-highlighting widgets. This also allows modifications
|
|
|
|
|
# to the widget list variables to take effect on the next precmd.
|
|
|
|
|
add-zsh-hook precmd _zsh_autosuggest_bind_widgets
|
2016-02-05 15:14:08 -07:00
|
|
|
}
|
2016-02-07 14:21:57 -07:00
|
|
|
|
2017-01-27 15:18:26 -07:00
|
|
|
# Start the autosuggestion widgets on the next precmd
|
2018-06-30 15:06:19 -06:00
|
|
|
autoload -Uz add-zsh-hook
|
2016-02-07 14:21:57 -07:00
|
|
|
add-zsh-hook precmd _zsh_autosuggest_start
|