lacy 0.1.1

Fast magical cd alternative for lacy terminal navigators
1
2
3
4
5
6
7
8
9
10
11
use dialoguer::{theme::ColorfulTheme, Select};

pub fn select(title: &str, options: Vec<&str>) -> String {
    let selection = Select::with_theme(&ColorfulTheme::default())
        .with_prompt(title)
        .items(&options)
        .default(0)
        .interact()
        .unwrap();
    options[selection].to_string()
}