Expand description
FS-only builtin commands over crate::filesystem::Filesystem.
The v1 builtin commands — fs-only, over crate::filesystem::Filesystem.
Read/search/create only: echo, ls, cat, wc, grep, find, mkdir,
and write/create (create-only — they refuse to overwrite). NO
value-moving / lh-* platform commands (v2). cd is NOT here — it mutates
the evaluator’s current directory, so the evaluator handles it directly.
Every builtin is TOTAL: a bad path / missing file / regex error becomes a
nonzero exit + stderr text, never a panic. Paths are resolved against cwd
([resolve]); the sandbox root is / and there is no escaping it
(.. that would climb above root clamps to root).
Functions§
- dispatch
- Dispatch a builtin by name. Unknown commands return a nonzero exit (so a
script can branch on it) rather than erroring the whole run — matching a
shell’s
command not found(exit 127). - dispatch_
in - Dispatch with an explicit current directory (the evaluator’s
cwd).