zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.81k stars 1.85k forks source link

toggle on and off #601

Closed maxandersen closed 3 years ago

maxandersen commented 3 years ago

Is your feature request related to a problem? Please describe.

I would like to turn off and on autosuggest without having to change my config setup. This is so when recording videos or demoing some functionality I want to avoid the terminal showing the final line too early :)

I tried setting ZSH_AUTOSUGGEST_HISTORY_IGNORE="" and ZSH_AUTOSUGGEST_COMPLETION_IGNORE="" but it still autosuggests.

Describe the solution you'd like

have a ZSH_AUTOSUGGEST_DISABLE variable to turn it off.

Describe alternatives you've considered

setting _IGNORE patterns - that did not reliably turn it off.

maxandersen commented 3 years ago

note, im not sure if this is more a bug report about IGNORE not seeming to ignore or for a new global toggle.

I'm fine if setting IGNORE would actually turn it off.

ericfreese commented 3 years ago

Hi, would binding a key to the autosuggest-toggle widget work for you?

https://github.com/zsh-users/zsh-autosuggestions#key-bindings