plop icon indicating copy to clipboard operation
plop copied to clipboard

Accepting `short` as input?

Open unional opened this issue 1 year ago • 0 comments

inquirer's choice question support this short value. Is it possible to use that as the input when doing it through command line?

for example:

export default function (plop) {
  plop.setGenerator('test', {
    description: 'blah',
    prompts: [{
      type: 'list',
      name: 'where',
      message: 'something',
      choices: [{
        name: 'some name that can be quite long',
        short: 'blah',
        value: 'some-value'
      }, {
        name: 'another very long name',
        short: 'blah2',
        value: 'some-value2'
      }]
    }]
  })
}

can invoke this with: plop blah2

https://www.npmjs.com/package/inquirer#questions

unional avatar Oct 06 '22 02:10 unional