promkit
promkit copied to clipboard
A toolkit for building interactive prompt in Rust
Resolves #11
I would like to easily annotate a configuration struct, to ask the user for input for various fields and give a hint on validation: ```rust use derive_bla::AskUser; #[derive(Debug, AskUser)] struct...
Since `type Validator = fn(&T) -> bool;`, i can't do something like: ```rs let existing_filenames = read_dir(...); Readline::default() .title("Name new file:") .validator(|name| !existing_filenames.contains(name.to_string()), |name| format!("File {} already exists", name)) .prompt()?...
### Description Adding a `pretty_print` method to `JsonNode` and `JsonStream`; we will be using this to create pretty printed json which will be used to be copied to the clipboard...
Right now the filter functions gets the stringified items as an argument. Would it be possible to receive the items slice instead? It would make filtering in my case easier,...
## Rationale Give users a bit of freedom to choose `std::io::Write`. One specific use case is to pipe `stdout` and keep `promkit` interactive by rendering `promkit` to `stderr`. ## Limitation...
I'm implementing a form similar to the one in examples. Is there a way to fill value with a given value that user can modify?