Crate ytil_tui

Crate ytil_tui 

Source
Expand description

Provide minimal TUI selection & prompt helpers built on inquire.

Offer uniform, cancellable single / multi select prompts with stripped visual noise and helpers to derive a value from CLI args or fallback to an interactive selector.

Modulesยง

git_branch

Structsยง

YesNoIter ๐Ÿ”’
An iterator over the variants of YesNo

Enumsยง

YesNo ๐Ÿ”’
Represents a yes or no choice for user selection.

Functionsยง

closable_prompt ๐Ÿ”’
Converts an [inquire] prompt Result into an Option-wrapped Result.
get_item_from_cli_args_or_select
Returns an item derived from CLI args or asks the user to select one.
minimal_multi_select
Provides a minimal interactive multi-select prompt, returning Option::None if no options are provided, the user cancels, or no items are selected.
minimal_render_config ๐Ÿ”’
Returns a minimalist [RenderConfig] with cleared prompt/answered prefixes.
minimal_select
Minimal interactive single-select returning Option::None if opts is empty or the user cancels.
text_prompt
Displays a text input prompt with the given message, allowing cancellation.
yes_no_select
Displays a yes/no selection prompt with a minimal UI.