piotrmurach / tty-prompt

A beautiful and powerful interactive command line prompt
https://ttytoolkit.org
MIT License
1.47k stars 136 forks source link

Add a :min option to multi_select/multi_list #125

Closed slowbro closed 4 years ago

slowbro commented 4 years ago

Describe the change

Adds the ability to set a minimum number of items to be selected in a TTY::Prompt.multi_select

Why are we doing this?

There's a maximum - why not a minimum? I ran into a need for this recently and thought I would add it.

Benefits

More options!

Drawbacks

None that I can think of.

Requirements

Put an X between brackets on each line if you have done the item: [x] Tests written & passing locally? [x] Code style checked? [x] Rebased with master branch? [x] Documentation updated?

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.05%) to 97.158% when pulling 88d86ddd430b5c3dfc32d3268708436b409bfee7 on slowbro:multiselect-minimum into 0abe466253917b612a81e886a505243f23f80872 on piotrmurach:master.

piotrmurach commented 4 years ago

Great PR, pleasure to merge in. Thank you ❤️