-
-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multiple choice prompt #218
Comments
A new prompt toolkit is planned in #210 that might allow that. With our current toolkit, it's not possible. However, that doesn't mean we will implement what you ask. Isn't using 4 boolean questions just good enough? 🤔 : # copier.yml
use_travis: yes
use_circleci: yes
use_gitlabci: yes
use_jenkins: yes Your templating is going to be a lot easier too this way. |
Looking forward to #210 being implemented! :) Yes, boolean is definitely an alternative here, though I would look nicer with an multiple choice prompt. |
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:
With multiple choices:
We would then have to cast the multiple choice values as lists of the specified type of course. |
Yeah however, what does this exactly add? I mean, supporting this use case doesn't seem so easy, and at the end of the day you just get the same features but printed in a different fashion. Is it worth it? We don't have a huge team here... 🤔 I guess when we handle #210 we'll have to see how easy this is. And if it isn't much easy, I guess this will be discarded. |
@yajo This is definitely a nice to have but would make a nicer "UI" for the end user consuming the copier template. |
@yajo I Just discovered copier after trying so many similar tools, and I am loving it so far. :) My only "complain" until now is the lack of the multi-choice option that I used in another tool. I can work around using multiple boolean questions, but if I have a big list of options, I think it´s less efficient. For example, I am building a template for generating "GitHub files" like Readme, LICENSE, CODE_OF_CONDUCT, actions, etc. I want the user to select what files to generate. Having to ask all this in multiple questions, when they could simply toggle an option in a list, is a bit boring and more time-consuming IMO. Just want to ask if this issue can still be considered. Thank you. |
Obrigado for your kind words! This issue is in the roadmap, so it will come at some point. As you see above, we were waiting for the big refactoring done for v6, but that's already done so adding this feature should be easy now. It's just a matter of adding support for a new kind of question and using the corresponding prompt from the However I'm giving priority to community PRs, bug and UX fixes and I do not think that I'll be working on this soon. I labeled the issue as good for newbies. Maybe someone wants to contribute the feature, and that'll make it land faster! |
yes After I wrote this comment, I looked a bit in the code and found that I might give a shot at this and try to submit a PR as it´s basically the only thing missing so far for my use cases :) |
…g `multiselect: true`. Fixes copier-org#218
#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:
The text was updated successfully, but these errors were encountered: