1.0.0 • Published 2 years ago

inquirer-glob-prompt v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

inquirer-glob-prompt

Glob prompt for inquirer. Prompts for a glob and lists matching files as you type.

Installation

$ npm install --save inquirer-glob-prompt

Usage

import inquirer from 'inquirer';
import GlobPrompt from 'inquirer-glob-prompt';

// you can change 'glob' to any prefered type name
inquirer.registerPrompt('glob', GlobPrompt);

let answers = await inquirer.prompt([{
  type: 'glob',
  name: 'filePaths'
  // ...
}]);

console.log(answers);

Options

Takes type, name, message, default, when, pageSize, glob properties. See inquirer documentation for properties other than glob.

glob (Object) options are passed directly to fast-glob during initial render and whenever input changes.

Example

Run the example:

$ node example.js

License

MIT