忽略.ackrc中的子目录 [英] Ignoring sub-directories in .ackrc

查看:111
本文介绍了忽略.ackrc中的子目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想配置.ackrc,以使ack不在test / coverage文件夹中。到目前为止,我已经结束了:

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

问题是后者不起作用,并且搜索了test / coverage内容。

Problem is the latter doesn't work and test/coverage content is searched.

我是否缺少某些内容或不准备使用ack处理子目录?

Am I missing something or is ack not prepared to deal with subdirectories ?

推荐答案

ack更改日志明确提及此功能,自ack 1.93_02开始受支持。
Quote: --ignore-dir选项现在可以忽略相对于当前目录的整个路径。

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."

我尝试了一下,它可以工作。我会检查您的test / coverage目录是否直接与您正在运行ack的文件夹有关。否则,我不确定会发生什么。

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.

这篇关于忽略.ackrc中的子目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆