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.

Add multiple choice prompt

See original GitHub issue

#93/#107 implemented support for single choice questions. I’d love to see an option to use multiple choice prompts. Thinking about something like this:

ci_type:
  type: str
  help: Which CI configuration do you need?
  multiplechoice:
    - travis
    - circleci
    - gitlabci
    - jenkins
Which CI configuration do you need?
ci_type? Format: str
🎤
( ) travis
( ) circleci
( ) gitlabci
( ) jenkins

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
pawamoycommented, Jun 9, 2020

I was going to say that I agree with @Yajo that 4 booleans parameters would be easier to use in the templates, but actually typing it shows that it would still be simple with a “multiple choice” value.

With booleans:

{% if use_travis %}...

With multiple choices:

{% if "travis" in ci_type %}...

We would then have to cast the multiple choice values as lists of the specified type of course.

2reactions
baurmattcommented, Jun 10, 2020

@Yajo This is definitely a nice to have but would make a nicer “UI” for the end user consuming the copier template.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I add multiple choice questions to an assignment?
Then, click 'Add Section'. 5. Click 'Edit Section'. 6. Click 'Write Questions'. 7. Then, select 'Multiple Choice Question' and click next.
Read more >
How to Create a Multiple Choice Menu in Bash Scripts - Putorius
Learn how to create a multiple choice menu for your Bash scripts. This allows the user to select a number that corresponds to...
Read more >
06 - Multiple choice input - YouTube
This video explain about how to implement Multiple choice inputin Bot Framework composerDownload the code here ...
Read more >
prompt multiple choice to user R - Stack Overflow
Make a little Shiny app in R. Have a look at http://shiny.rstudio.com/gallery/ for some examples. Here is an example of a dropdown box....
Read more >
Multiple choice question with user Input in Python | bobbyhadz
The code snippet prompts the user to select one of the multiple available choices but uses letters instead of numbers. We used the...
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