Ignoring sub-directories in .ackrc

大城市里の小女人 提交于 2019-12-14 00:18:51

问题


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 ?


回答1:


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.



来源:https://stackoverflow.com/questions/7765813/ignoring-sub-directories-in-ackrc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!