aosho235
aosho235

Reputation: 323

ag Silver Searcher: List ignored/searched files

ag provides multiple mechanisms for ignoring files (hidden files, VCS ignored files, .agignore ...). These are quite helpful, but sometimes this makes me wonder which files in my file tree are actually ignored / searched. Is there a quick way to check this?

I tried ag '^' to get a list of searched files, but 0 bytes files were not included in it.

Upvotes: 2

Views: 492

Answers (1)

Chad Nouis
Chad Nouis

Reputation: 7051

If no search query is provided, the -l option (that's a lower-case "L") lists the files that would be searched by ag:

-l --files-with-matches: Only print the names of files containing matches, not the matching lines. An empty query will print all files that would be searched.

Upvotes: 2

Related Questions