danmayer/churn

Allow more flexible ignores (e.g. **/<file> for nested files)

mcandre opened this issue · 3 comments

I have several nested directories that I would like to churn all at once. Many of these each contain their own .gitignore, and I would like to configure churn to not only ignore the top level .gitignore, but any .gitignore in the sub directories as well.

Maybe my syntax is wrong?

$ churn -i ".gitignore, **/.gitignore"
...
| haskell/.gitignore        | 3             |
| latex/.gitignore          | 3             |

makes sense, I will look at improving the matcher or get back to you with better syntax suggestions.

I basically would want to support the same style as gitignore files

@danmayer Yeah, I love gitignore style!

Sorry so I basically forgot about this PR because I was looking for a gitingore implementation... Which was harder to come by than I thought... I tried a few approaches and backed out...

Eventually I pushed this

a06eaa5

which basically allows regex opposed to exact match.

I did see this which would implement a subset of the most important .gitignore rules... For now it seems to complicated

https://gist.github.com/MrJoy/3868993

@mcandre what do you think... would the regex version work well enough? Also, really sorry this fell off my radar.