Ignoring sub-directories in .ackrc
Asked Answered
R

1

10

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 ?

Raving answered 14/10, 2011 at 9:42 Comment(1)
You're not missing anything. I'm looking as well but it doesn't seem to be an option as best I can tell.Norean
T
12

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.

Twoway answered 4/11, 2011 at 16:9 Comment(2)
Good to know, ubuntu's ack version being 1.92 it didn't work for me. Hope they upgrade soon. Thanks.Raving
the link simply redirects to home page.. m having the same problem.. but not getting the exact solution. what should i write in .ackrc.Prolocutor

© 2022 - 2024 — McMap. All rights reserved.