dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

Support question - how to make a dropdown list and select from list #287

Closed ORESoftware closed 6 years ago

ORESoftware commented 6 years ago

I would like create a command line option called "find" which will search for matching files on the filesystem and will listen then. The user can then use the up/down arrow keys to select which file they want:

  suman> find --match "a"
  [1] => /foo/bar/baz/1.js
  [2] => /foo/bar/baz/2.js
  [3] => /foo/bar/baz/3.js

the user could then select one of these files using the up/down arrow keys, or perhaps by typing the number 1 2 or 3.

Is this possible with Vorpal or do I need to use Inquirer itself?

ORESoftware commented 6 years ago

looks like this answered my question: https://github.com/dthree/vorpal/issues/48