promptly

A simple, opinionated prompting library

Features include:

Usage

Simply call prompt or prompt_default to prompt for any Promptable type:

```rust use promptly::{prompt, promptdefault, promptopt};

// Prompt until a non-empty string is provided let name: String = prompt("Enter your name")?;

// Prompt for other FromStr types let age: u32 = prompt("Enter your age")?;

// Prompt for optional paths with path completion. Returns None if empty input. let photo: Option = prompt_opt("Enter a path to a profile picture")?;

// Prompt Y/n with a default value when input is empty let fallback = prompt_default("Would you like to receive marketing emails", true);

// Prompt for a url using the url crate (requires either 'nightly' or 'url' feature) let website: Url = prompt("Enter a website URL"); ```

More...

The API surface of this crate is opinionated and experimental, but open to fresh ideas.