Silver Searcher - How to ignore a file
Add just multiple --ignore, at least this works for me:
ag -Qt --ignore ".*tags" --ignore asdf
If you don't put quotes it's interpreted as directory if you put quotes as PATTERN
After some research, it seems that it is a known issue documented here. Where if you do an --all-text (-t) search it'll override --ignore since it's searching for all texts. This issue is present for --unrestricted too.
Put the list of files to exclude in .agignore
.
Note: as @DenilsonSáMaia mentioned, .agignore
will be deprecated in favor of .ignore
geoff.greer.fm/2016/09/26/ignore