CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.91k stars 235 forks source link

Non-automatic 'yes' #119

Open SonGokussj4 opened 3 years ago

SonGokussj4 commented 3 years ago

Hi! I believe I've already seen this issue here but can't find it.

Would it be possible to include a parameter for the "type: confirm" to not automatically react on keyboard? Instead wait for "y" or "yes"?

Reasoning: For a few of my functions there are confirmations and I want to be able to run it by yes | myscript --function, not it terminates with an exception.

Something like:

questions = [
        {
            'message': msg,
            'name': 'continue',
            'type': 'confirm',
        }
    ]
    answers = prompt(questions, style=QSTYLE, react=True/False)