Expand description
Command execution: ExecContext, redirects, and builtin dispatch (pwd, cd, ls, mkdir, cat, touch, echo, export-readonly, save, todo, exit/quit).
Structs§
- Exec
Context - Execution context: VFS and standard streams for one command.
Enums§
- Builtin
Error - Error from builtin execution (redirect or VFS failure, unknown command).
- RunResult
- Result of running a pipeline: continue the REPL loop or exit.
Constants§
- PIPELINE_
INTER_ STAGE_ MAX_ BYTES - Maximum bytes buffered for a non-terminal pipeline stage’s stdout (host memory; design §8.2).
Functions§
- execute_
pipeline - Execute a pipeline: run each command with stdin from previous stage (or
ctx.stdinfor first), stdout to a buffer; last command’s stdout is written toctx.stdout. Redirects override pipe. - run_
builtin - Apply redirects: build optional stdin (Cursor over file content), stdout/stderr buffers. Then run the builtin with the effective streams; after that write stdout/stderr buffers to vfs if redirected.