cli-ux icon indicating copy to clipboard operation
cli-ux copied to clipboard

How to add default value for prompt

Open danielh-official opened this issue 4 years ago • 0 comments

Let's say I want to show a greyed-out value next to the colon (in parenthesis) when prompting. Like how Node does it when you run npm init and it asks for the name of your directory. It automatically guesses based on folder or repo name and shows it in the aforementioned format. You don't have to manually enter it.

Example

npm init

name: (name-of-repo)

You can use the default name given to you or enter it manually.

Are we able to replicate that in this framework?

danielh-official avatar Oct 23 '21 22:10 danielh-official