demand 2.0.1

A CLI prompt library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use demand::Input;

fn main() {
    let input = Input::new("Set a password")
        .placeholder("Enter password")
        .prompt("Password: ")
        .password(true);
    match input.run() {
        Ok(_) => {}
        Err(e) => {
            if e.kind() == std::io::ErrorKind::Interrupted {
                println!("{}", e);
            } else {
                panic!("Error: {}", e);
            }
        }
    }
}