Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ag 提供了多种忽略文件的机制(隐藏文件、VCS 忽略文件、.agignore ...)。这些很有帮助,但有时这让我想知道我的文件树中的哪些文件实际上被忽略/搜索了。有没有快速的方法来检查这个?
我试图ag '^'获取搜索文件的列表,但其中不包含 0 字节文件。
ag '^'
如果未提供搜索查询,则该-l选项(即小写“L”)列出将被搜索的文件ag:
-l
ag
-l --files-with-matches:只打印包含匹配项的文件名,而不是匹配的行。空查询将打印所有要搜索的文件。