Class PipelineParser

java.lang.Object
org.jline.shell.impl.PipelineParser

public class PipelineParser extends Object
Parses a command line string into a Pipeline.

By default, the parser recognizes all operators defined in Pipeline.Operator, using their default symbols. Custom symbol mappings can be provided via the PipelineParser(Map) constructor to override default symbols:

 // Replace > and >> with |> and |>> (e.g. for Groovy)
 new PipelineParser(Map.of("|>", Operator.REDIRECT, "|>>", Operator.APPEND))
 
When a custom mapping targets an Pipeline.Operator that already has a default symbol, the default symbol is replaced. This allows languages where > has a different meaning to use alternative redirect syntax.

The parser respects quoting (single and double) and bracket nesting, so operators inside quoted strings or brackets are not treated as pipeline operators.

Subclasses can override matchOperator(String, int) to customize operator matching beyond what the constructor-based approach supports.

Since:
4.0