This Zsh add-on colors the interactive command line as you type, similar to Fish shell highlighting. It helps spot syntax problems before executing commands.
Overview
Zsh Syntax Highlighting plugs into the Zsh line editor and recomputes colors for the current buffer while you compose a command at the prompt. The emphasis is on interactive shells rather than batch scripts.
It requires Zsh 4.3.11 or newer and must be sourced late in zshrc so its hooks run after other widgets and completion setup. On releases newer than 5.8 it registers a pre-redraw hook; older versions wrap ZLE widgets instead.
Incremental history search can show full highlighting only when Zsh itself is new enough to expose the needed buffer information; on older Zsh builds you still get default match underlining without the extra colors.
Highlighting rules live in pluggable highlighter scripts, and documentation describes how to tune them. Installation steps are documented separately for package managers and manual setup.
Key features
- Live prompt command coloring
- Syntax error visual cues
- ZLE hook integration
- Pluggable highlighter modules
- Configurable highlight styles
- Works with interactive Zsh sessions
- History search highlighting on new Zsh
- Late zshrc sourcing pattern
Use cases
- Reviewing long shell commands
- Catching quoting mistakes early
- Comfortable Fish-like Zsh UX
- Teaching shell syntax visually
- Daily terminal workflow polish