How do I ignore specific directories via RegEx with ack?
I can use the --ignore-dir
option, but this does not let me specify a RegEx. I want to be able to i
In recent versions of ack, you can use regular expressions with --ignore-dir
.
From this thread:
Yes, in 2.15_01 we added:
- ack now supports --ignore-dir=match:.... Thanks, Ailin Nemui! (GitHub ticket #42)
GitHub link: https://github.com/petdance/ack2/issues/42
Sadly, I think this only supports matching the base directory name, not the full path.
For instance, you cannot match a path like ".*/docs/generated/.*"
with it.
For that, see the GitHub issue 291.
update for 2020: it looks like this is now moved to ack3 (github issue).