Expand description
Search indexing for commands, guides, and extra documents. Interactive prompt helpers for CLI commands.
These functions wrap inquire to provide consistent prompts that respect
the global interactivity mode. Each helper returns a Result that
produces a user-cancelled error when the user presses Escape or Ctrl+C.
All functions require an interactive TTY. Call them only when
CommandContext::is_interactive
returns true.
Enums§
- Command
Correction - Outcome of a “did you mean X?” correction prompt.
- Recovery
Result - Result of attempting interactive recovery for missing args.
Functions§
- build_
resume_ command - Build a resume command string from the already-supplied args.
- confirm_
command_ correction - Offer to correct an unknown command spelling. Never prompts when non-interactive;
interactivity follows the same raw-args rules as
try_recover_missing_args. - prompt_
confirm - Prompt the user for a yes/no confirmation.
- prompt_
multi_ select - Prompt the user to select multiple options from a list.
- prompt_
select - Prompt the user to select one option from a list.
- prompt_
text - Prompt the user for a free-text string input.
- prompt_
text_ with_ validation - Prompt the user for a free-text string with input validation.
- try_
recover_ missing_ args - Attempt to interactively recover from a clap
MissingRequiredArgumenterror.