zsh-autosuggestions
Fish-like autosuggestions for zsh
zsh-autosuggestions: gray text that finishes your commands
A zsh plugin that offers fish like completions as you type, accepts them with the right arrow or End key, and lets you restyle the suggestion color.
What shows up as you type
The plugin offers fish like autosuggestions for zsh. As you type a command, a completion appears after the cursor in a muted gray color, which can be changed by setting a highlight style variable. The effect is a constant preview of what your command will probably become. The plugin does not block typing; the suggestion only appears as a hint. Shell is the primary language and the license is MIT.
Accepting a suggestion
With the cursor at the end of the buffer, pressing the right arrow key or the End key accepts the suggestion and replaces the command line contents with it. Invoking the forward word widget partially accepts the suggestion, up to the point the cursor moves to. Both behaviors mirror what fish users already expect, and the widget based model keeps the whole flow keyboard driven.
Configuration options
Default global config variables can be overridden, with default values available for reference. For Oh My Zsh users, the configuration can be placed in a file in a custom directory. The README keeps the settings surface small, which fits a plugin whose entire job is one line of behavior. There is little to configure, and the section stays short because of it.
Scope of the README
The README sticks close to usage and configuration: how suggestions render, which keys accept them, and where to put your settings. The description on GitHub sums it up as fish like autosuggestions for zsh. The narrow scope keeps the plugin easy to reason about.
Community notes