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

Auto-accept default #41

Open
jlambert121 opened this issue May 13, 2024 · 0 comments
Open

Auto-accept default #41

jlambert121 opened this issue May 13, 2024 · 0 comments

Comments

@jlambert121
Copy link

I have a CLI that takes a bunch of different flags for a few commands which can be difficult for users to remember. I was looking for a way to prompt users easily for things that were missed/invalid without making them start over and edit their flags and found this. I'd like to be able to auto-submit valid answers passed in via flags so the final "is this correct" prompt can have everything easily look the same without having to have users hit enter on defaults they supplied.

What I mean is, if --thing1 answer1 --thing2 answer2 are supplied but --required3 was missed, is there a way to easily produce the below (without the user having to confirm thing1 and thing2?

✔ Thing1: … answer1
✔ Thing2: … answer2
? required3: › foo

I looked at the options for Choose and Input and didn't find a way.

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