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Β§
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::Noneif no options are provided, the user cancels, or no items are selected. - minimal_
select - Minimal interactive single-select returning
Option::Noneifoptsis empty or the user cancels. - run_
simple_ πprompt - Runs [
skim] with plain-textinputlines and returnsOption::Noneon 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.