anc95 / inquirer-file-tree-selection

inquirer prompt for select a file or dir by file tree
49 stars 26 forks source link

Feat: ignoring certain files #91

Closed antonio-hickey closed 1 year ago

antonio-hickey commented 1 year ago

I think a nice feature would be the ability to ignore certain files from displaying in the tree. Where it ignores none by default, but allows the user to pass a optional array of patterns (strings) to match against for files that the user does NOT want displayed. Maybe this functionality is handled already if so please point me in the right direction.

I'm willing to contribute to this feat, getting familiar with the codebase right now.

anc95 commented 1 year ago

Hello @antonio-hickey , thanks for your motivation for contributing.

For your demand, I think you can use the combination validate and onlyShowValid prop to ignore specific files

antonio-hickey commented 1 year ago

Hey @anc95 , thanks for the reply.

I'll try this out and close the issue if it works.