Expand description
Shell command parser with pipeline and redirection support.
Supports:
- Simple commands:
ls /tmp - Pipes:
cat /tmp/foo | grep bar - Output redirect (truncate):
ls > /tmp/out - Output redirect (append):
ls >> /tmp/out - Input redirect:
grep pattern < /tmp/input - Combinations:
cat /tmp/data | grep key > /tmp/result
Structs§
- Command
- Parsed command structure.
- Pipeline
- A parsed pipeline (one or more stages connected by
|). - Pipeline
Stage - A single stage in a pipeline.
Enums§
- Redirect
- Output redirection target.
Functions§
- parse
- Parse a simple command line (no pipe/redirect support).
- parse_
pipeline - Parse a full command line into a
Pipeline.