inquire 0.7.5

inquire is a library for building interactive prompts on terminals
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use inquire::Confirm;

fn main() {
    let ans = Confirm::new("Do you live in Brazil?")
        .with_default(false)
        .with_help_message("This data is stored for good reasons")
        .prompt();

    match ans {
        Ok(true) => println!("That's awesome!"),
        Ok(false) => println!("That's too bad, I've heard great things about it."),
        Err(_) => println!("Error with questionnaire, try again later"),
    }
}