prompt icon indicating copy to clipboard operation
prompt copied to clipboard

Auto-accept default

Open jlambert121 opened this issue 9 months ago • 0 comments

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.

jlambert121 avatar May 13 '24 10:05 jlambert121