miller/pkg/terminals
John Kerl 36d75898a0 Remove os.Exit callsites below the entrypoint: phase 2 (plans/exit.md)
Phase 2 of plans/exit.md: the FlagParser signature change.

- FlagParser gains an error return; all 259 inline parser closures in
  option_parse.go and NoOpParse1 updated (mechanical rewrite, compiler-checked).
- FlagTable.Parse returns (bool, error); its nine callers (climain passes one
  and two, .mlrrc line handling, verb-local flag parsing in tee/join/put/
  filter/split, and the repl/script terminals) propagate the error instead of
  letting parsers kill the process.
- cli.CheckArgCount returns its missing-argument message as an error rather
  than printing and exiting; new cli.FlagErrorf (counterpart of VerbErrorf)
  carries user-facing main-flag messages.
- The 14 print-and-exit sites inside parser closures become returned errors;
  --list-color-codes/--list-color-names return ExitRequest{0} after printing.
- The repl and script terminals translate ExitRequest into their int return
  codes, so 'mlr repl --list-color-codes' still exits 0.
- pkg/cli is now os.Exit-free; stale comments about exiting parsers updated
  (the completion introspection accessors remain, since parsers mutate the
  options struct).

Stderr messages and exit codes are byte-identical, including the two-line
missing-argument and --seed messages and the trailing-period forms pinned by
test/cases/cli-mfrom/0003.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 13:50:13 -04:00
..
completion Shell tab-completion for bash and zsh (#2096) 2026-06-21 12:47:54 -04:00
help Add mlr mcp MCP server + agent playbook, with a --no-shell gate (#2098 PR7) (#2133) 2026-07-03 19:41:49 -04:00
mcp More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
registry More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
regtest Remove os.Exit callsites below the entrypoint: phase 1 (#2198) 2026-07-15 11:34:01 -04:00
repl Remove os.Exit callsites below the entrypoint: phase 2 (plans/exit.md) 2026-07-15 13:50:13 -04:00
script Remove os.Exit callsites below the entrypoint: phase 2 (plans/exit.md) 2026-07-15 13:50:13 -04:00
skill More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
doc.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
terminals.go More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00