Mercurial > dotfiles
comparison .zfun/zsh-autosuggestions/src/start.zsh @ 467:e1ce8897030d
zsh: import df6f6f9ff41 of zsh-autosuggestions
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 03 Dec 2018 22:37:29 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
466:f248cf012d9a | 467:e1ce8897030d |
---|---|
1 | |
2 #--------------------------------------------------------------------# | |
3 # Start # | |
4 #--------------------------------------------------------------------# | |
5 | |
6 # Start the autosuggestion widgets | |
7 _zsh_autosuggest_start() { | |
8 add-zsh-hook -d precmd _zsh_autosuggest_start | |
9 | |
10 _zsh_autosuggest_bind_widgets | |
11 | |
12 # Re-bind widgets on every precmd to ensure we wrap other wrappers. | |
13 # Specifically, highlighting breaks if our widgets are wrapped by | |
14 # zsh-syntax-highlighting widgets. This also allows modifications | |
15 # to the widget list variables to take effect on the next precmd. | |
16 add-zsh-hook precmd _zsh_autosuggest_bind_widgets | |
17 | |
18 if [[ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]]; then | |
19 _zsh_autosuggest_async_start | |
20 fi | |
21 } | |
22 | |
23 # Start the autosuggestion widgets on the next precmd | |
24 add-zsh-hook precmd _zsh_autosuggest_start |