Command splitter is not a shell parser #211

Open
opened 2026-11-21 12:36:52 +00:00 by johannes · 0 comments
Owner

Location: crates/hx-core/src/permit.rs, chain splitter
What is hacky: hand-rolled splitter; heredocs, {} groups, $'..' always prompt.
Proper fix: use a real shell parser (e.g. tree-sitter-bash or shlex-based AST) to classify safely.
Original comment: "ponytail: not a shell parser (no heredocs, {} groups, $'..'); those ask every time."

Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).

Location: crates/hx-core/src/permit.rs, chain splitter What is hacky: hand-rolled splitter; heredocs, `{}` groups, `$'..'` always prompt. Proper fix: use a real shell parser (e.g. tree-sitter-bash or shlex-based AST) to classify safely. Original comment: "ponytail: not a shell parser (no heredocs, `{}` groups, `$'..'`); those ask every time." Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).
johannes added the core label 2026-11-21 12:36:52 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#211