Interactive CLI prompts in Rust

Create interactive input prompts like in GitHub's CLI tool.

presentation

Features

Getting started

More elaborate examples can be found in the examples directory

```rust use cli_prompts::{ prompts::{Input, AbortReason}, DisplayPrompt }

fn show_input_prompt() {
  let name : Result<String, AbortReason> = Input::new("Enter your name", name_validation)
      .default_value("John")
      .help_message("Please provide your real name")
      .display();

  match name {
      Ok(n) => println!("The name is {}", n),
      Err(abort_reason) => println!("Input was aborted because of {:?}", abort_reason),
  }
}

fn name_validation(name: &str) -> Result<String, String> {
  if name.len() > 0 {
      Ok(name.to_string())
  } else {
      Err("Name must not be empty".into())
  }
}

```

License

This project, cli_prompts is licensed under the MIT License - see the LICENSE file for details.