How zsh-users/zsh-syntax-highlighting works
zsh-syntax-highlighting adds Fish-like syntax highlighting to commands typed at an interactive Zsh prompt. The documented flow is that ZLE provides the current command-line buffer to a registered hook, and pluggable highlighters compute highlighting for that buffer. The README documents the hook behavior and plugin model, but no source excerpts were provided, so internal dispatch among highlighters is not asserted.
Main entry points: zsh-syntax-highlighting.zsh ZLE Hook · main-highlighter.zsh Main Highlighter · brackets-highlighter.zsh Bracket Highlighter · cursor-highlighter.zsh Cursor Highlighter
Components 11
Zsh Integration
- Zsh Line Editor
- ZLE Hook
zsh-syntax-highlighting.zsh
Highlighter Plugins
- Main Highlighter
highlighters/main/main-highlighter.zsh - Bracket Highlighter
highlighters/brackets/brackets-highlighter.zsh - Cursor Highlighter
highlighters/cursor/cursor-highlighter.zsh - Line Highlighter
highlighters/line/line-highlighter.zsh - Pattern Highlighter
highlighters/pattern/pattern-highlighter.zsh - Regexp Highlighter
highlighters/regexp/regexp-highlighter.zsh - Root Highlighter
highlighters/root/root-highlighter.zsh
Prompt Output
- Interactive Terminal
Other components
- Shell User
Connections 10
- Shell User → Zsh Line Editor: types command
README.md - Zsh Line Editor → ZLE Hook: runs hook
README.md - ZLE Hook → Main Highlighter: uses plugin
- ZLE Hook → Bracket Highlighter: uses plugin
- ZLE Hook → Cursor Highlighter: uses plugin
- ZLE Hook → Line Highlighter: uses plugin
- ZLE Hook → Pattern Highlighter: uses plugin
- ZLE Hook → Regexp Highlighter: uses plugin
- ZLE Hook → Root Highlighter: uses plugin
- ZLE Hook → Interactive Terminal: applies highlighting
README.md