Expand description
The command itself: argument parsing, option, meta and plugin wiring,
source merging and serialization. The port of ts/src/jsonic-cli.ts
and of go/cli/run.go.
Structs§
- Captured
- What one captured run produced. The counterpart of the
linesa Gologgerrecords and ofcn.d.login the TypeScript suite: one entry per printed call, so an entry that spans several physical lines (the help text, the grammar description, indented JSON) stays one entry.
Functions§
- capture
- Run the command and collect what it printed instead of writing it to a stream, so a caller can inspect the individual printed entries.
- run
- Run the command over
argv, whose first entry is the program name, asstd::env::argsyields it. Standard input is read only when it is needed, and every line the command prints goes tostdout; a failure is reported onstderr. The return value is the process exit code. - run_
with_ plugins run, withextraplugins available to-p/--pluginfor this run alone. A same-named entry wins over the registry, which is how the suite injects fixture plugins without touching the process-wide registry.