console-rs / dialoguer

Rust utility library for nice command line prompts and similar things
MIT License
1.31k stars 143 forks source link

Introduce MultiSelectPlus #303

Open SIMULATAN opened 6 months ago

SIMULATAN commented 6 months ago

This PR introduces a new prompt: MultiSelectPlus.

This prompt extends on the existing MultiSelect, adding support for:

This allows prompts like this: asciicast showcasing new features

I created this feature specifically for https://github.com/SuperCuber/dotter/pull/112. Therefore, it is slightly opinionated. I'd happily alter specifics of the implementation to align the new features with the rest of the library.

Note for reviewers: since I copy-pasted the multi_select.rs file, here's the diff between the two: https://xgob.in/6p6sdiy1 (unfortunately, github doesn't allow you to upload .diff or .patch files..)