Expand description
A fzf-like library for terminal applications
You can use it to build a menu for selecting items from a list in terminal with ui. It supports both normal mode and query mode, and you can customize the colorscheme.
§Demo

§Key Mapping
j/kordown/upto move the cursorenterto select the item/to enter query mode just like vimctrl-n/ctrl-pto move the cursor in query modeescto exit query mode or the menuctrl-cto exit the menu
§Examples
let mut menu = termenu::Menu::new().unwrap();
let mut item_list = Vec::new();
for i in 1..=10 {
item_list.push(Item::new(format!("{}th item", i).as_str(), i));
}
let selection = menu
.set_title("test selection:")
.add_list(item_list)
.select()
.unwrap();
if let Some(selection) = selection {
println!("You selected: {}", selection);
}Check the examples folder for more details.
Structs§
- colorscheme of the menu
- style of font
- item in the menu
- the menu itself
Enums§
- Italic, Bold, Underline