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

Modify support #8

Open rog555 opened 6 years ago

rog555 commented 6 years ago

would be great to have more control within the event loop of updating kwargs sent to prompt_toolkit (eg allowing completer to be defined) and for access to answers

this PR allows this via modifyKwargs and modifyAnswers parameters which take function as value. It could be possible to use filter to achieve same affect as modifyAnswers, but this might be less of a hack

documentation and tests included, however although it works - i cant get test to fully work with completer (involves TAB key) - but it does actually work :-)

hopefully this is of interest

markfink commented 6 years ago

Hi Roger, thank you for your PR. I do not really see how you need a new TAB control. I hope you understand that I can not accept a PR that breaks the tests.