Zsh autosuggestion bindkey

Hold esc and enter to accept the suggested command and execute it.

bindkey '^[^M' autosuggest-execute # esc + enter

Hold esc and enter to accept the suggested command but not execute it. The cursor will go to the end of the command.

bindkey '^[ ' autosuggest-accept # esc + space

Last updated

Was this helpful?