Reputation: 323
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
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