zsh-autosuggestions/src/start.zsh
Eric Freese 4321fc097c We need to bind on every precmd to ensure we wrap other wrappers
Specifically, highlighting breaks if our widgets are wrapped by z-syn-h
widgets.
2017-02-17 23:20:04 -07:00

18 lines
527 B
Bash

#--------------------------------------------------------------------#
# Start #
#--------------------------------------------------------------------#
# Start the autosuggestion widgets
_zsh_autosuggest_start() {
_zsh_autosuggest_feature_detect
_zsh_autosuggest_bind_widgets
if [ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]; then
_zsh_autosuggest_async_start
fi
}
# Start the autosuggestion widgets on the next precmd
add-zsh-hook precmd _zsh_autosuggest_start