rich
rich copied to clipboard
REQUEST-3385 add timeout to prompt.ask
Type of changes
- [ ] Bug fix
- [x] New feature
- [x] Documentation / docstrings
- [x] Tests
- [ ] Other
Checklist
- [x] I've run the latest black with default args on new code.
- [x] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
- [x] I've added tests for new code.
- [x] I accept that @willmcgugan may be pedantic in the code review.
Description
Add optional argument timeout to the ask method in Prompt class.
After timeout message Prompt timed out! will be printed, and default value will be used or empty string
Issue: #3385
I would also love to have this feature.