# zsh-syntax-highlighting

> Fish shell like syntax highlighting for Zsh

- Type: agent or tool
- Field: System & Self-hosted
- Repository: https://github.com/zsh-users/zsh-syntax-highlighting
- GitHub stars: 23032
- Licence: BSD-3-Clause
- Language: Shell
- Last push: 2026-10-09
- Page: https://imutechz.in/agents/zsh-syntax-highlighting

## What it is
zsh-syntax-highlighting adds fish-like syntax highlighting to the zsh shell. It highlights commands as they are typed at an interactive zsh prompt, which helps users review commands before running them and catch syntax errors. It works by hooking into the Zsh Line Editor (ZLE) and computing highlighting for the command-line buffer. It is aimed at zsh users who want visual feedback while typing commands.

## Features
- Highlights commands while typed at an interactive zsh prompt
- Helps catch syntax errors before running commands
- Hooks into the Zsh Line Editor (ZLE)
- Uses pluggable highlighter scripts for configuration
- Supports highlighting during incremental history search on zsh 5.4+
- Must be sourced at the end of .zshrc

## Best for
- Reviewing commands before execution
- Catching syntax errors while typing
- Adding visual feedback to an interactive zsh prompt
- Users who want fish-like highlighting in zsh

## Pros
- Provides syntax highlighting for zsh commands as they are typed
- Helps in reviewing commands before running them
- Highlighting is done by pluggable highlighter scripts

## Cons
- Requires zsh 4.3.11+
- Highlighting during incremental history search requires zsh 5.4 or newer
- Must be sourced at the end of the .zshrc file

Tags: zsh, syntax-highlighting, shell, zle, terminal, fish-like, command-line
