Exclude directories and/or parse .gitignore
adalinesimonian opened this issue · 3 comments
Is there a mechanism by which to exclude directories during a recursive search? Like an --exclude-dir
or an ability to read an ignore file like .gitignore?
Currently it is possible to exclude dirs in configuration file (either in ~/.cgreprc or /etc/cgrerc).
Unfortunately the --exclude-dir option is not present from the command like, as well as, the parsing of .gitignore, which would be a very handful feature.
Hope to add both by the next week.
Thanks for the suggestion.
Hello,
I've just submitted a patch that enables local .cgreprc files (which override user- and system wide configurations), in which it is possibile to specify the list of directories to prune during the recursive search. In addition I added the command line option --prune-dir which can be used to add additional directories to prune on the fly.
Parsing gitignore instead requires a bit of rework... and it's scheduled for the next release.
N.
Thanks for the remarkably fast turnaround, @awgn; this is great! 👍