wincent / command-t

⌨️ Fast file navigation for Neovim and Vim
BSD 2-Clause "Simplified" License
2.76k stars 321 forks source link

Fix turning */foo/* wildignore into a regexp #287

Closed trotzig closed 7 years ago

trotzig commented 7 years ago

I was trying to get rid of files inside dist folders in my command-t search results. So I added this to my wildignore setting for vim:

*/dist/*

...which didn't seem to have any effect. I'm using watchman, so at first I thought that there might some cache that needs to be invalidated. But watchman watch-del <path> didn't help.

I decided to change the wildignore pattern to */dist. This worked, and didn't require any cache invalidation.

Digging through the code, I found a simple way to reproduce the but in an rspec test. So I decided to fix it, by

trotzig commented 7 years ago

If this looks good, I can flesh out the tests for the wildignore_to_regexp function.

wincent commented 7 years ago

Thanks for this, @trotzig. It's been a while since I looked at this code, and I probably need to get a solid 8 hours sleep before being able to review it properly/safely. But in principle, let's do this!

wincent commented 7 years ago

Sweet. Nice work.