我如何使用 ack 的 --ignore-file 选项?
How do I use ack's --ignore-file option?
如果我把
--ignore-file=example.txt
进入我的 .ackrc 或在 ack 命令行上,我收到错误消息 "Invalid filter specification "example.txt"。
ack 文档说 --ignore-file 选项将过滤器作为参数。什么是过滤器?如何使用 --ignore-file 来简单地忽略文件?
使用 is:filename 作为您的过滤器:
--ignore-file=is:example.txt
过滤器与 ack type definitions 相同,可以是带 is 的文字文件名、带 ext 的文件扩展名或要匹配的正则表达式。
如果我把
--ignore-file=example.txt
进入我的 .ackrc 或在 ack 命令行上,我收到错误消息 "Invalid filter specification "example.txt"。
ack 文档说 --ignore-file 选项将过滤器作为参数。什么是过滤器?如何使用 --ignore-file 来简单地忽略文件?
使用 is:filename 作为您的过滤器:
--ignore-file=is:example.txt
过滤器与 ack type definitions 相同,可以是带 is 的文字文件名、带 ext 的文件扩展名或要匹配的正则表达式。