Fish-like fast/unobtrusive autosuggestions for zsh.
It suggests commands as you type based on history and completions.
Requirements: Zsh v4.3.11 or later
As you type commands, you will see a completion offered after the cursor
in a muted gray color. This color can be changed by setting the
Style configuration option.
If you press the → key (
forward-char widget) or End (
end-of-line widget) with the cursor at the end of the buffer, it will accept the suggestion, replacing the contents of the command line buffer with the suggestion.
If you invoke the
forward-word widget, it will partially accept the suggestion up to the point that the cursor moves to.
This plugin provides a few widgets that you can use with
autosuggest-accept: Accepts the current suggestion.
autosuggest-execute: Accepts and executes the current suggestion.
autosuggest-clear: Clears the current suggestion.
autosuggest-fetch: Fetches a suggestion (works even when suggestions are disabled).
autosuggest-disable: Disables suggestions.
autosuggest-enable: Re-enables suggestions.
autosuggest-toggle: Toggles between enabled/disabled suggestions.
For example, this would bind ctrl + space to accept the current suggestion.
bindkey '^ ' autosuggest-accept