adelsz / inquirer-fuzzy-path

Fuzzy file/directory search and select prompt for Inquirer.js
MIT License
88 stars 20 forks source link

add excludeFilter option to filter final result #17

Closed HaykoKoryun closed 4 years ago

HaykoKoryun commented 4 years ago

There is an edge case where the excludePath option is not sufficient to achieve the desired result.

For example say you were trying to list all of the directories in the current directory to carry out some process inside the selected one, naturally you would want to exclude .. If you do that however you exclude the current directory and thus all of the sub directories.

A proposal is to offer an excludeFilter option that expects a function to run for each item in the final result to decide if it should be filtered out.

adelsz commented 4 years ago

Merged!