忽略 .ackrc 中的子目录
我想配置我的 .ackrc ,这样 ack 就不会在我的 test/coverage 文件夹中查找。到目前为止,我已经得到了这个:
--ignore-dir=coverage
这可行,但感觉并不像:
--ignore-dir=test/coverage 那么正确问题
是后者不起作用并且搜索测试/覆盖内容。
我是否遗漏了某些内容或者 ack 没有准备好处理子目录?
I'd like to get my .ackrc configured so ack doesn't look inside my test/coverage folder. So far I've ended up with this :
--ignore-dir=coverage
This works, but it doesn't feel quite as right as :
--ignore-dir=test/coverage
Problem is the latter doesn't work and test/coverage content is searched.
Am I missing something or is ack not prepared to deal with subdirectories ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ack 变更日志 明确提到这是一项功能,自 ack 1.93_02 起就受支持。
引用:“--ignore-dir 选项现在可以忽略相对于当前目录的整个路径。”
我尝试过并且有效。我会检查您的 test/coverage 目录是否与您正在运行 ack 的文件夹直接相关。否则我不确定会发生什么。
The ack changelog explicity mentions this as a feature, supported since ack 1.93_02.
Quote: "The --ignore-dir option now can ignore entire paths relative to your current directory."
I tried it and it works. I would check if your test/coverage directory is directly relative to the folder you're running ack from. Otherwise I'm not sure what could be going on.