Skip to main content

Module prompt

Module prompt 

Source
Expand description

The stdin/stdout Prompter (ADR-051 D4/D2).

cli-core owns the prompt policy as declared data (PromptPlan) and the message text each arm asks with; this module owns only the interaction: ask on stdout, read one line from stdin, and mirror click.confirm’s semantics - a bare Enter yields the default, anything that is not y/yes declines, and EOF declines (click raises Abort on a closed stdin, which the arm maps to CliError::Aborted).

No terminal control is used: the progress bar owns stderr, the prompt owns stdout, so the two never fight over the same draw surface (ADR-051 D9).

Structs§

ConsolePrompter
The real stdin/stdout prompter.

Functions§

confirm_with
Ask message on writer and read one line from reader.