Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inquirer-select-directory

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inquirer-select-directory

A directory prompt for Inquirer.js

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
66K
decreased by-1.55%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Build Status Build status Codacy Badge

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.registerPrompt('directory', require('inquirer-select-directory'));
inquirer.prompt({
  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.registerPrompt('directory', require('inquirer-select-directory'));
inquirer.prompt([{
  type: 'directory',
  name: 'from',
  message: 'Where you like to put this component?',
  basePath: './src'
}]).then(function(answers) {
  //etc
});

Options

options.displayFiles

default false

Set this to true if you to display files

inquirer.prompt([{
  type: 'directory',
  //...
  options: {
      displayFiles:true
  }
}]).then(function(answers) {
  //etc
});
options.displayHidden

default false

Set this to true if you to display hidden folders (and files if displayFiles is set to true)

inquirer.prompt([{
  type: 'directory',
  //...
  options: {
      displayHidden:true
  }
}]).then(function(answers) {
  //etc
});

License

MIT

Keywords

FAQs

Package last updated on 10 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc