# inquirer-file

> a file (relative to given path) selector for Inquirer.js

Latest version **1.0.1** (published 2018-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install inquirer-file
pnpm add inquirer-file
yarn add inquirer-file
bun add inquirer-file
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-06-16 |
| First published | 2018-06-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 12.6 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Wilfried Moulin |
| Maintainers | moulinw |
| Keywords | Inquirer, file, prompt |

## Links

- npm: https://www.npmjs.com/package/inquirer-file
- Repository: https://github.com/wmoulin/inquierer-file
- Homepage: https://github.com/wmoulin/inquierer-file#readme
- Issues: https://github.com/wmoulin/inquierer-file/issues
- npm.io page: https://npm.io/package/inquirer-file

## Dependencies (7)

- [util](https://npm.io/package/util.md) ^0.10.3
- [chalk](https://npm.io/package/chalk.md) ^1.1.1
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [figures](https://npm.io/package/figures.md) ^1.4.0
- [rx-lite](https://npm.io/package/rx-lite.md) ^4.0.8
- [inquirer](https://npm.io/package/inquirer.md) ^1.1.3
- [cli-cursor](https://npm.io/package/cli-cursor.md) ^1.0.2

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-06-16
- 1.0.0 — 2018-06-15

## README

# inquirer-directory

Relative File prompt for [inquirer](https://github.com/SBoudrias/Inquirer.js)

## Installation

```
npm install --save inquirer-file
```

## 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.

## Usage


This prompt is anonymous, meaning you can register this prompt with the type name you please:

```javascript
inquirer.registerPrompt('file', require('inquirer-file'));
inquirer.prompt({
  type: 'file',
  ...
})
```

Change `file` to whatever you might prefer.

### Options

Takes `type`, `name`, `message`, `basePath`, `ext` properties.

See [inquirer](https://github.com/SBoudrias/Inquirer.js) readme for meaning of all except **basePath** and **ext**.

**basePath** is the relative path from your current working directory
**ext** is the file extension for the file

#### Example

```javascript
inquirer.registerPrompt('file', require('inquirer-file'));
inquirer.prompt([{
  type: 'file',
  name: 'from',
  message: 'Where you like to put this component?',
  basePath: './src',
  ext: '.js'
}], function(answers) {
  //etc
});
```

See also [example.js](https://github.com/nicksrandall/inquierer-file/blob/master/example.js) for a working example

## License

MIT

---
_Source: https://npm.io/package/inquirer-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
