Skip to main content

Module shell

Module shell 

Source
Expand description

A small, dependency-free shell tokenizer.

Good enough to recover an argv from a command line for recording and for the Tier-1 rule engine: it understands single quotes, double quotes, and backslash escaping. It is deliberately not a full shell parser — it does not expand variables, globs, or handle here-docs. The raw command is always preserved separately, so this is only ever an aid, never the source of truth.

Functions§

split
Split a command line into tokens, honoring '…', "…", and \ escapes.