eprompt

Crates.ioeprompt
lib.rseprompt
version0.3.0
sourcesrc
created_at2022-11-04 15:27:47.141646
updated_at2022-11-11 20:04:38.245278
descriptionEasy to use interactive prompt library. No complex structs or traits, just a few simple to use functions.
homepagehttps://github.com/dmaahs2017/eprompt/
repository
max_upload_size
id705245
size85,524
Dalton (dmaahs2017)

documentation

README

eprompt is a easy to use prompt library for rust.

No complicated structs, or traits. Just simple functions that do what they say.

Usage example:

use eprompt::*;

// user can use j, k, up or down to change selection. Space to check a box, enter to finalize.
let tasks: Vec<_> = multi_select("What would you like to do today?", &["Eat a cake", "Go to work", "Go on a hike"]).unwrap();

// user can use j, k, up or down to change selection, space or enter to finalize.
let selection: &f32 = select("Choose an option", &[6.9, 3.14])).unwrap();

// This will automatically parse the input to the desired type. If the input is invalid it will have the user try again.
let age: i32 = input("How old are you?").unwrap();

screenshot

Commit count: 0

cargo fmt