ichoose
A TUI interactive selection menu built on ratatui. Used by iforgor, but usable standalone as a binary or Rust library.
Binary usage
Pipe a list to ichoose via stdin, one entry per line:
ID @ NAME
ID @ NAME @ DESCRIPTION
If @ is not found, the whole line is used as both ID and name. Selected IDs are
printed to stdout, one per line.
|
# Outputs selected ID, e.g.: b
# Multi-select:
|
Flags: --title <TITLE>, --text <TEXT>, --multi.
Library usage
let items = vec!;
let result = ListSearch
.run?;
// result.selected: BTreeSet<K> of chosen keys
// result.action: Option<String> if a custom action key was pressed
Features
- Search: type to filter by name/description. Comma-separated terms use AND logic.
- Key:value filters:
tag:x,shell:bash, etc. viafilter_callback. - Preview pane: Tab toggles a side panel via
preview_callback. - Multi-select: Right toggles item, Left toggles all visible.
- Action keys:
ActionKeyenum (F-keys, Ctrl+char, Alt+char, etc.) for custom actions that exit the picker with an action name. - History list:
empty_search_listshows an alternate list when search is empty. - Preserved order:
preserve_orderskips alphabetic sorting. - Visual: rounded borders, reverse-video highlight, scrollbar, item count, block cursor.