Inquirer.js icon indicating copy to clipboard operation
Inquirer.js copied to clipboard

Pre-defined answers

Open aleclarson opened this issue 7 years ago • 5 comments

I should be able to pass a hash of pre-defined answers to prompt that essentially auto-fills the associated prompts.

The pre-defined answers would still be passed to the filter, transformer, and validate functions. Beforehand, they would be coerced to a string as if they were manually typed into the prompt.

WDYT?

aleclarson avatar Aug 01 '18 17:08 aleclarson

This would be very valuable for testing

rdpacheco avatar Jan 23 '19 17:01 rdpacheco

@rdpacheco See #709

aleclarson avatar Jan 23 '19 17:01 aleclarson

@rdpacheco See #709

This is great, hope it gets merged soon. Thanks!

rdpacheco avatar Jan 29 '19 03:01 rdpacheco

@rdpacheco Unlikely that it will, because it modifies the "old" codebase and has no unit tests.

aleclarson avatar Jan 29 '19 03:01 aleclarson

what about pre-set 'environmental variable' @aleclarson

jeasonstudio avatar Feb 15 '19 03:02 jeasonstudio

Not sure when that was added, but a PR was merged with that feature. See documentation.

(cleaning old issues)

SBoudrias avatar Sep 28 '24 21:09 SBoudrias