Closed amorfinv closed 3 years ago
Hi, I think I would try using something like add-zle-hook-widget line-init autosuggest-enable
(add to your .zshrc after sourcing zsh-autosuggestions) to always try to re-enable the suggestions when starting a new prompt.
See the docs for add-zle-hook-widget
here https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#ZLE-Functions
Worked perfectly @ericfreese. Thank you!
Is your feature request related to a problem? Please describe.
I'd like a bindkey that combines
autosuggest-disable
and thenautosuggest-enable
. Basically, I want to disable autosuggest, execute my command, and then enable autosuggest without having to use two bindkeys. autosuggest-disableand
autosuggest-enable` (or autosuggest-toggle two times).Describe the solution you'd like
1) I start typing out a command.
2) I execute a bindkey to disable autosuggest
3) I finish typing my command without autosuggest and then execute
4) After executing autosuggest should be automatically enabled without having a new bindkey.
My laziness is kicking in so the extra microsecond of work would be nice to avoid.
Describe alternatives you've considered
I have tried to read a bit through some issues/documentation but I did not find out if there is a way to do this. However, there are somethings I don't understand so there is a high chance that I missed an explanation.
Thanks, -Andres