inquirer-fuzzy-path
Fuzzy file/directory search and select prompt for Inquirer.js
Usage
Register the prompt with inquirer:
inquirer.registerPrompt('fuzzypath', require('inquirer-fuzzy-path'))
Call the prompt:
return inquirer.prompt([
{
type: 'fuzzypath',
name: 'path',
excludePath: nodePath => nodePath.startsWith('node_modules'),
excludeFilter: nodePath => nodePath == '.',
itemType: 'any',
rootPath: 'app',
message: 'Select a target directory for your component:',
default: 'components/',
suggestOnly: false,
depthLimit: 5,
}
]);
Change log
- In version 2.2.0 new option
excludeFilter
was added. - In version 2.1.0 new option
depthLimit
was added. - In version 2.0.0 option
filterPath
was deprecated. Please use excludePath
and itemType
instead.
Related
- inquirer - A collection of common interactive command line user interfaces
License
MIT © adelsz