Class CommandHighlighter

java.lang.Object
org.jline.shell.impl.CommandHighlighter
All Implemented Interfaces:
Highlighter

public class CommandHighlighter extends Object implements Highlighter
Command-aware syntax highlighter for the shell.

Highlights the first word of the command line based on whether it is a known command in the dispatcher:

  • Known commands are highlighted in bold
  • Unknown commands are highlighted in red
  • Pipeline operators (|, &&, ||, ;, etc.) are highlighted in cyan

An optional delegate Highlighter can be provided for composability. If provided, the delegate is called first, then command highlighting is applied on top.

Since:
4.0