piotrmurach / tty-prompt

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

Add `Choices#enabled` #144

Closed DanielVartanov closed 4 years ago

DanielVartanov commented 4 years ago

Describe the change

Adds a convenient function of Choices#enabled as requested in https://github.com/piotrmurach/tty-prompt/pull/142/files#r443211952

Why are we doing this?

Niceness of this addition has been discovered by accident in https://github.com/piotrmurach/tty-prompt/pull/142

Benefits

It enriches the public API and makes the code cleaner/more readable.

Drawbacks

Will have to support it in future as it is a part of public API now

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.005%) to 97.346% when pulling 5d4aafbd53a08cb98b497939ae9279af859b52f5 on DanielVartanov:add-choices-enabled into b330a32eb0d509b9d515d59819b9745e0cea0b42 on piotrmurach:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.2%) to 97.189% when pulling 5d4aafbd53a08cb98b497939ae9279af859b52f5 on DanielVartanov:add-choices-enabled into b330a32eb0d509b9d515d59819b9745e0cea0b42 on piotrmurach:master.

piotrmurach commented 4 years ago

Nice! ❤️