inquirer-select-directory
A directory prompt for Inquirer.js.
This project is a fork of Inquirer-directory which does not limit the navigation to the current folder.
Installation
npm install --save inquirer-select-directory
Features
- Support for symlinked files
- Vim style navigation
- Search for file with "/" key
Key Maps
- Press "/" key to enter search mode.
- Press "-" key to go up (back) a directory.
- Press "." key to select the current directory.
Usage
This prompt is anonymous, meaning you can register this prompt with the type name you please:
inquirer;inquirerprompt type: 'directory' ...
Change directory
to whatever you might prefer.
Parameters
Takes type
, name
, message
, basePath
, options
properties.
See inquirer readme for meaning of all except basePath.
basePath is the relative path from your current working directory
Example
inquirer;inquirerprompt type: 'directory' name: 'from' message: 'Where you like to put this component?' basePath: './src';
Options
options.displayFiles
default false
Set this to true if you to display files
inquirerprompt type: 'directory' //... options: displayFiles:true ;
options.displayHidden
default false
Set this to true if you to display hidden folders (and files if displayFiles is set to true
)
inquirerprompt type: 'directory' //... options: displayHidden:true ;
License
MIT