Crates.io | termenu |
lib.rs | termenu |
version | 2.0.2 |
source | src |
created_at | 2024-09-30 13:23:38.925164 |
updated_at | 2024-10-30 10:36:27.532006 |
description | A fzf-like library for terminal applications |
homepage | |
repository | https://github.com/sshelll/termenu |
max_upload_size | |
id | 1391707 |
size | 50,908 |
fzf-like terminal ui api for rust
check examples folder
# basic example
cargo run --example basic
# complex example
cargo run --example complex
fn main() {
let mut menu = termenu::Menu::new().unwrap();
let mut item_list = Vec::new();
for i in 1..=10 {
item_list.push(termenu::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);
}
}