Go back to the main page

Ignoring files with ag – silver searcher

 

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