# inquirer-fuzzy-path

> Fuzzy file/directory search and select prompt for inquirer.

Latest version **2.3.0** (published 2020-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install inquirer-fuzzy-path
pnpm add inquirer-fuzzy-path
yarn add inquirer-fuzzy-path
bun add inquirer-fuzzy-path
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2020-05-04 |
| First published | 2018-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/inquirer-fuzzy-path) |
| Module format | CommonJS |
| Node | >=8.0 |
| Dependencies | 5 |
| Unpacked size | 69 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | adelsz |
| Maintainers | aldesz |
| Keywords | fuzzy, inquirer, directory, file, search, select |

## Links

- npm: https://www.npmjs.com/package/inquirer-fuzzy-path
- Homepage: https://github.com/adelsz/inquirer-fuzzy-path
- npm.io page: https://npm.io/package/inquirer-fuzzy-path

## Dependencies (5)

- [fuzzy](https://npm.io/package/fuzzy.md) ^0.1.3
- [inquirer](https://npm.io/package/inquirer.md) ^6.0.0
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^4.0.0
- [ansi-styles](https://npm.io/package/ansi-styles.md) ^3.2.1
- [inquirer-autocomplete-prompt](https://npm.io/package/inquirer-autocomplete-prompt.md) ^1.0.2

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 2.3.0 (latest) — 2020-05-04
- 2.2.1 — 2020-05-04
- 2.2.0 — 2019-12-15
- 2.1.0 — 2019-07-29
- 2.0.3 — 2019-03-18
- 2.0.2 — 2019-02-11
- 2.0.1 — 2019-01-27
- 2.0.0 — 2019-01-27
- 1.0.0 — 2018-05-21

## README

# inquirer-fuzzy-path


[![npm](https://img.shields.io/npm/v/inquirer-fuzzy-path)](https://www.npmjs.com/package/inquirer-fuzzy-path)
[![npm](https://img.shields.io/npm/dw/inquirer-fuzzy-path)](https://www.npmjs.com/package/inquirer-fuzzy-path)

Fuzzy file/directory search and select prompt for Inquirer.js 

![inquirer-fuzzy-path demo](https://raw.githubusercontent.com/adelsz/inquirer-fuzzy-path/master/recording.gif)

## Usage

Register the prompt with inquirer:
```javascript
inquirer.registerPrompt('fuzzypath', require('inquirer-fuzzy-path'))
```

Call the prompt:
```javascript
  return inquirer.prompt([
    {
      type: 'fuzzypath',
      name: 'path',
      excludePath: nodePath => nodePath.startsWith('node_modules'),
        // excludePath :: (String) -> Bool
        // excludePath to exclude some paths from the file-system scan
      excludeFilter: nodePath => nodePath == '.',
        // excludeFilter :: (String) -> Bool
        // excludeFilter to exclude some paths from the final list, e.g. '.'
      itemType: 'any',
        // itemType :: 'any' | 'directory' | 'file'
        // specify the type of nodes to display
        // default value: 'any'
        // example: itemType: 'file' - hides directories from the item list
      rootPath: 'app',
        // rootPath :: String
        // Root search directory
      message: 'Select a target directory for your component:',
      default: 'components/',
      suggestOnly: false,
        // suggestOnly :: Bool
        // Restrict prompt answer to available choices or use them as suggestions
      depthLimit: 5,
        // depthLimit :: integer >= 0
        // Limit the depth of sub-folders to scan
        // Defaults to infinite depth if undefined
    }
  ]);
```

## 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](https://github.com/SBoudrias/Inquirer.js) - A collection of common interactive command line user interfaces

## License

MIT © [adelsz](https://github.com/adelsz)

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