explaingit

zsh-users/zsh-autosuggestions

Analysis updated 2026-06-20

35,399ShellAudience · developerComplexity · 1/5Setup · easy

TLDR

zsh-autosuggestions is a Zsh shell plugin that shows gray ghost-text suggestions from your command history as you type, so you can accept a full command with one keystroke instead of retyping it.

Mindmap

mindmap
  root((zsh-autosuggestions))
    How it works
      History search
      Ghost text display
      Updates as you type
    Accepting Suggestions
      Right arrow key
      End key
      Word by word key
    Installation
      Clone and source
      Oh My Zsh plugin
      Prezto module
    Audiences
      Developers
      Sysadmins
      Terminal power users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Accept frequently-used terminal commands with a single right-arrow keypress instead of retyping them from memory.

USE CASE 2

Speed up long git, Docker, or SSH commands by completing them from history after typing just a few characters.

USE CASE 3

Get Fish-shell style autosuggestions inside Oh My Zsh or Prezto without switching shells.

What is it built with?

ShellZsh

How does it compare?

zsh-users/zsh-autosuggestionsopen-guides/og-awsinkonchain/node
Stars35,39936,41336,633
LanguageShellShellShell
Setup difficultyeasyeasymoderate
Complexity1/51/53/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

In plain English

zsh-autosuggestions is a plugin for Zsh, a popular Unix command-line shell, that shows command suggestions in gray text as you type, based on your command history. The problem it solves is that retyping commands you have used before is tedious and slow. Fish, another shell, pioneered this approach, and this plugin brings the same behavior to Zsh. The way it works is straightforward: as you type each character, the plugin looks through your shell history (and optionally your tab-completion candidates) to find the most recent command that starts with what you have typed so far. If it finds a match, the rest of that command appears grayed out to the right of your cursor. You accept the suggestion by pressing the right arrow key or End key, which fills in the full command without you having to type the rest. If you keep typing, the suggestion updates dynamically to match your new input. You can also accept only one word at a time using a separate keybinding. Installation is straightforward: you clone the repository, add a single line to your .zshrc configuration file, and the plugin activates automatically in every new terminal session. It is compatible with Oh My Zsh, Prezto, and other Zsh framework managers, so users of those frameworks can install it with even less manual setup. A developer or system administrator who uses Zsh as their terminal shell and wants faster command-line navigation without memorizing full command syntax would use zsh-autosuggestions. It is written in Shell script and works on any Unix system running Zsh.

Copy-paste prompts

Prompt 1
I installed zsh-autosuggestions but the gray suggestion text is invisible against my dark terminal background. How do I change the suggestion highlight color in my .zshrc?
Prompt 2
How do I configure zsh-autosuggestions to suggest from both command history and tab-completion candidates? Show me the ZSH_AUTOSUGGEST_STRATEGY setting and how to enable the completion strategy.
Prompt 3
I want to accept only the next word of a zsh-autosuggestions suggestion instead of the whole line. What keybinding do I add to .zshrc to enable partial word-by-word acceptance?

Frequently asked questions

What is zsh-autosuggestions?

zsh-autosuggestions is a Zsh shell plugin that shows gray ghost-text suggestions from your command history as you type, so you can accept a full command with one keystroke instead of retyping it.

What language is zsh-autosuggestions written in?

Mainly Shell. The stack also includes Shell, Zsh.

How hard is zsh-autosuggestions to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is zsh-autosuggestions for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub zsh-users on gitmyhub

Verify against the repo before relying on details.