Ack ignores node_modules by default
node_modules. But if your are on a spelunking journey into the depths of your dependencies, you may want to search through all your
node_modules by default, and
ack you can
ack to check it out:
> cat `which ack` | ack node_modules --ignore-directory=is:node_modules
This is different behaviour from
rg which also ignore
node_modules but not explicitly. They both ignore
node_modules by ignoring all entries in the
rg claims to implement full support for the
.gitignore file while also claiming other search tools do not. The open issues list for
ag bears that out.
With each of these tools, explicitly stating the directory to search through overrides the ignore.
> ack autoprefix node_modules > rg autoprefix node_modules > ag autoprefix node_modules