tui: add --batch mode to run a script and print output headless
BootDispatch already runs --restore/--source synchronously before the TUI starts (Source takes its headless drain branch when no screen is attached), so the console buffer is complete by then. New --batch flag dumps that buffer (Tui::DumpOutput) to stdout and exits without launching the TUI — enabling scripted/CI runs and verify output capture (e.g. essim --batch --source s). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -197,6 +197,9 @@ public:
|
||||
~Tui();
|
||||
void Run();
|
||||
void DumpCommandsMd(std::ostream &out) const;
|
||||
// Write the accumulated console output to `out`. Used by batch mode to
|
||||
// surface a script's output without starting the TUI.
|
||||
void DumpOutput(std::ostream &out) const;
|
||||
|
||||
// Boot-time hook: dispatch a single command exactly as if the user
|
||||
// typed it (e.g. `restore foo.essim` or `source bring-up.essim`).
|
||||
|
||||
Reference in New Issue
Block a user