【发布时间】:2012-12-01 19:21:43
【问题描述】:
我知道,如果我只想在具有特定扩展名的文件上查找模式,我可以这样做:
// searches recursively and matches case insensitively in only javascript files
// for "res" from the current directory
grep -iIr --include=*.js res ./
我也一直在尝试通过 git grep 寻找一种方法来执行此操作(以利用 git grep 从它存储在其树中的索引的速度),但无济于事。我看到here 排除某些文件类型是不可能的。
【问题讨论】:
标签: git grep file-extension