question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[REQUEST] option to respond to choices with digits

See original GitHub issue

How would you improve Rich?

related to #306, It would be nice to make it easier to pick from a variety of annoying-to-type choices:

choices = ['Some really long and annoying thing to type', 'Another really long...']
Prompt.ask('pick one', choices=choices, with_digits=True)

could prompt as follows (or something like this … where the valid responses are now digits)

[1] Some really long and annoying thing to type
[2] Another really long...
pick one [1/2]: 

What problem does it solve for you?

makes it much easier to request categorical values

in #306, readline was mentioned, but I didn’t follow, so let me know if there’s already a better way to do this. thanks for rich!!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
TheTriocommented, Dec 24, 2021

Thanks for your suggestions! Have created a PR 😃

0reactions
github-actions[bot]commented, Sep 20, 2022

Did I solve your problem?

Why not buy the devs a coffee to say thanks?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get started with DIGITS | T-Mobile Support
Check out the available DIGITS options below. On this page: PROXY by DIGITS; DIGITS Talk & Text; Data with paired DIGITS; Setup DIGITS...
Read more >
Formatting Answer Choices - Qualtrics
Editing Answer Choices ... To edit an answer choice, simply click the answer choice in the survey editor and type the choice into...
Read more >
Form, question, response, and character limits in Microsoft ...
Learn about the limits to the number of forms, questions per form, and responses per form for Microsoft Forms.
Read more >
Accept numbers in different language for multiple choice answer of ...
If I have a "Ask a Question" step of multiple-choice type and the options are numbers (e.g. 1, 2, 3). The contact replies...
Read more >
HTTP/1.1: Status Code Definitions
The server MUST send a final response after the request has been completed. ... If the server has a preferred choice of representation,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found