Skip to content
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

feature: add a "question" template for getting input from user in templates #84

Open
davidovich opened this issue Feb 4, 2022 · 1 comment

Comments

@davidovich
Copy link
Owner

I see it practical that we provide a "question" template function that could be used to ask user about inputting info

Used in a summon file something like:

namespace: {{ question "what namespace should be used" "default" }}
cluster: {{ question "please specify the destination cluster" [splice of choices] }}
@davidovich
Copy link
Owner Author

Questions or input can be pre-defined or inlined. Inlining is order dependant, naturally. Pre-defined inputs are invoked at program startup time. One would prefer to design the cli with the former as it would be less surprising than in-the-middle execution stops for prompting. Inlining would be used in conditional scenarios where an input is only needed for a certain part of the cli hierarchy, or optional data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant