markfink / whaaaaat

Inquirer.js port to Python (https://www.npmjs.com/package/inquirer). people blame me for staling this project. I do not have time to work on this right now - whaaaaat do you want me to do? take it offline?
MIT License
83 stars 9 forks source link

Dynamic question prompt #20

Closed denizs closed 2 years ago

denizs commented 6 years ago

This PR introduces a dynamic question prompt functionality configurable by the qmark kwarg. When defining a questionnaire, simply add a qmark key/value pair to customize your prompt like so:

questions = [
    {
       # ....
       'qmark': u'🐳 ',
       'message': 'Hey there, moby dick!'
    },
    {
        #...
        'message': 'Give me the key!',
        'qmark': u'🔑 ',
    }
]

Instead of question mark, you will see your customized prompt:

🐳 Hey there, moby dick!
🔑 Give me the key!
markfink commented 6 years ago

I do not see any automated test for that feature (BTW I do not accept any PR without tests). also I am not yet convinced on which terminals this works. Besides I am sure it works on yours :)