Expand description
Tokenization and cursor-aware command-line parsing. Shell-like tokenization and cursor analysis for completion.
This module exists to turn a partially typed input line plus a cursor offset into the structured data the completion engine actually needs: command path, tail items, pipe mode, and the active replacement span.
Contract:
- parsing here stays permissive for interactive use
- the parser owns lexical structure, not suggestion ranking
- callers should rely on
ParsedCursorLineandCursorStaterather than re-deriving cursor spans themselves
Structsยง
- Command
Line Parser - Shell-like parser used by the completion engine.
- Parsed
Cursor Line - Parsed command-line state for the full line and the cursor position.
- Token
Span - Token value with byte offsets into the original input line.