demo/demo.rs
1#![allow(unused_crate_dependencies)]
2
3use fuzzy_select::FuzzySelect;
4
5fn main() {
6 let items = vec!["Hello there", "General Kenobi", "You are a bold one"];
7
8 let item = FuzzySelect::new()
9 .with_prompt("Select your destiny:")
10 .with_options(items)
11 .with_query("o")
12 .with_initial_selection(2)
13 .select()
14 .expect("Failed to create FuzzySelect");
15
16 println!("You have chosen: {item:?}");
17}