![Latest Version] ![License]
inquire
is a library for building interactive prompts on terminals, inspired by survey.
Examples can be found in the examples
directory. Run them to see basic behavior:
$ cargo run --example form --features date
Currently, there are 5 different prompt types supported.
Text is the standard kind of prompt you would expect from a library like this one. It displays a message to the user, prompting them to type something back. The user's input is then stored in a String
and returned to the prompt caller.
```rust // ./examples/text_simple.rs
let name = Text::new("What is your name?").prompt();
match name { Ok(name) => println!("Hello {}", name), Err(_) => println!("An error happened when asking for your name, try again later."), } ```
With Text, you can customize several aspects: