interviewer 0.1.1

Simple CLI prompting crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use interviewer::{ask_many, set_consumable_quotes, Separator};

fn main() {
    // no escaping
    set_consumable_quotes(false);
    let s: Vec<String> = ask_many("Enter some strings: ", Separator::Whitespace).unwrap();
    // assume input was "a "b c d" e f"
    println!("{:?}", s); // ["a", "\"b", "c", "d\"", "e", "f"]

    // escaping
    set_consumable_quotes(true);
    let s: Vec<String> = ask_many("Enter some strings: ", Separator::Whitespace).unwrap();
    // assume input was "a "b c d" e f"
    println!("{:?}", s); // ["a", "b c d", "e", "f"]
}