Skip to main content

Crate ytil_tui

Crate ytil_tui 

Source
Expand description

Provide minimal TUI selection & prompt helpers built on [skim].

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

ModulesΒ§

git_branch

FunctionsΒ§

base_skim_options πŸ”’
Shared [SkimOptions] base: reverse layout, no info line, accept/abort keybindings.
find_selected_index πŸ”’
Recovers the original source-vector index by matching a selected item’s output text against the display texts collected before running skim.
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_select
Minimal interactive single-select returning Option::None if opts is empty or the user cancels.
run_simple_prompt πŸ”’
Runs [skim] with plain-text input lines and returns Option::None on abort.
run_skim_prompt πŸ”’
Feeds display-text items into [skim] via [SkimItemReader] and returns the selection output alongside the original display texts for index recovery.
select_options πŸ”’
Configures [SkimOptions] for single or multi-select mode with ANSI support.
simple_prompt_options πŸ”’
Lightweight prompt options with a visible prompt string and fixed height.
text_prompt
Displays a text input prompt with the given message, allowing cancellation via Esc / Ctrl-C.
yes_no_select
Displays a yes/no selection prompt.