FMCorz / mdk

Moodle Development Kit. A collection of tools meant to make developers' lives easier.
GNU General Public License v3.0
86 stars 47 forks source link

Make yes or no prompts equal #208

Closed adpe closed 1 year ago

adpe commented 2 years ago

Hi @junpataleta and @FMCorz

Another one. I've noticed that the yes or no command prompts are not throughout case insensitive and there is already an existing nice yesOrNo function in the tools which can be used to solve this issue.

Therefore I've refactored the stuff and provide this patch.

PS: Nice tool! Was working 5 years on daily basis with Moodle but never used it before - just recently discovered the power of this toolkit.

Cheers Adrian

FMCorz commented 1 year ago

Thanks @adpe,

It's a good idea to consolidate the prompts. Besides, I had done it wrong as I sometimes I wrote "Y/n" with the idea to emphasise on the danger of saying Yes by capitalising the letter. But most CLI tools use the capitalised letter as the default answer if none are entered so it was inconsistant and misleading.

If you could just adjust your pull request ot remove the unrelated changes related to Jira imports, that would be great!

Thanks!

adpe commented 1 year ago

Hey @FMCorz

Just rebased and resolved e.g. cleaned up your concerns about the Jira changes.

Greets Adrian

FMCorz commented 1 year ago

Brilliant, thanks for doing that!