Why doesn't --type-set work in ack?

0

In my .ackrc file I have this line

--type-set=vm=.vm

But when I run

ack-grep --vm blah

it searches all types of files.

Neither does this work:

ack-grep blah --type-set vm=.vm
ack-grep --type-set vm=.vm blah

Why?

sean hawk

Posted 2013-08-11T20:23:24.090

Reputation: 3

Answers

0

What version of ack are you using? 1.x or 2.x?

Do you have any aliases on ack? Are you invoking ack with -a behind the scenes somehow?

Andy Lester

Posted 2013-08-11T20:23:24.090

Reputation: 1 121

I'm running ack-grep version 1.92. No aliases and no -a. – sean hawk – 2013-08-18T02:40:04.700

Are you sure about the no -a? Try running ack -f, and then try ack -f --noenv and see if the results are different. – Andy Lester – 2013-08-18T05:11:20.597

This may be better handled over on the ack-users mailing list. Also, while you're at it, upgrade to ack 2.04. – Andy Lester – 2013-08-18T05:11:55.287

Sorry, I didn't notice my .ackrc has a line --all. BTW, this has nothing to do with aliases since I don't have an alias ack='ack-grep'. Thanks! – sean hawk – 2013-08-18T12:59:17.100

What I have found in the past is that people have not the ack=ack-grep alias, but more often ack='ack -a' aiias. – Andy Lester – 2013-08-18T14:48:55.887