Expand description
The prompt kinds: one behavioural module per question type.
Each kind implements the same question three ways from one place:
- non-interactive โ resolve to the declared default or return a typed error, without touching the terminal;
- line-driven โ print a numbered list (or plain prompt) once and parse a typed answer, re-asking on invalid input;
- key-driven โ draw a live frame and update it in place as arrow keys move focus and space toggles selection.
A kind chooses the interactive path by inspecting
Terminal::capabilities, so the
prompter never branches on a concrete terminal type.
Modulesยง
- confirm
- Yes/no confirmation with an explicit default.
- multi_
select - Multi-choice selection: a checkbox list in key-driven mode, a comma-separated numbered list in line-driven mode.
- select
- Single-choice selection: a radio list in key-driven mode, a numbered list in line-driven mode.
- text
- Freeform text entry with an optional default and optional validation.