zsh-autosuggestions/src/start.zsh

18 lines
527 B
Bash
Raw Normal View History

2016-02-06 06:14:08 +08:00
2016-02-14 15:29:43 +08:00
#--------------------------------------------------------------------#
# Start #
#--------------------------------------------------------------------#
2016-02-06 06:14:08 +08:00
# Start the autosuggestion widgets
_zsh_autosuggest_start() {
_zsh_autosuggest_feature_detect
2016-02-06 06:14:08 +08:00
_zsh_autosuggest_bind_widgets
2017-01-28 06:18:26 +08:00
if [ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]; then
_zsh_autosuggest_async_start
fi
2016-02-06 06:14:08 +08:00
}
2017-01-28 06:18:26 +08:00
# Start the autosuggestion widgets on the next precmd
add-zsh-hook precmd _zsh_autosuggest_start