Go back to the main page

Ignoring files with ag – silver searcher

This article is over 5 years old. Proceed with caution.

Regards ♨ ‐ Minimul


The pattern for --ignore is not a regex like for -G.

ag searchterm -G js$ # Only search Javascript files. -G allows for regular expressions
ag searchterm --ignore=*.js # Ignore searching through Javascript files. --ignore doesn't take a regex