IngoMeyer441 / simple-term-menu

A Python package which creates simple interactive menus on the command line.
MIT License
504 stars 44 forks source link

New Option to raise KeyboardInterrupt #50

Closed svartkanin closed 2 years ago

svartkanin commented 2 years ago

Introducing a new option to make the menu raise an KeyboardInterrupt instead of quitting silently

svartkanin commented 2 years ago

@IngoMeyer441 any chance to get this merged or is there any changes needed?

IngoMeyer441 commented 2 years ago

Sorry @svartkanin, I wanted to send to some change suggestions (directly as code) but was always busy with other tasks. I think your PR is useful and should be added to simple-term-menu. I have only a few things that could be changed:

svartkanin commented 2 years ago

@IngoMeyer441 yes I can rename it to raise instead and also add it in a sorted way :) Regarding the cli option, I just wanted to keep it consistent with the rest of constructor options being available. But I agree, it might not be as useful, so I can remove it

svartkanin commented 2 years ago

@IngoMeyer441 I've addressed all feedback and updated the PR :)

IngoMeyer441 commented 2 years ago

Thanks again! It is merged into develop. I added a small notice in the README explaining your new parameter. And sorry (again) for the long waiting time...