Expand description
Shell script parser for bash -lc and similar commands.
This module parses shell commands like:
bash -lc "git status && cargo check"Into individual command vectors for independent safety checking:
[["git", "status"], ["cargo", "check"]]Phase 4 Implementation: Uses tree-sitter for accurate bash AST parsing. Falls back to basic tokenization for minimal shell syntax.
Functionsยง
- parse_
bash_ lc_ commands - Parses
bash -lc "script"style invocations - parse_
shell_ commands - Parses a shell script into individual commands using tree-sitter bash grammar
- parse_
shell_ commands_ tree_ sitter - Parses a shell script using tree-sitter bash grammar only (no fallback tokenization).
- prewarm_
bash_ parser - Ensures the bash tree-sitter parser is initialized.