Ack: Search directory tree for files with a particular extension
As suggested by Andy Lester, you can also create a typeset without taking the trouble to add it in your .ackrc
file:
ack --type-set=cit=.citrus --cit "foo"
By default, ack
searches only in files with known types ( like *.java, *.cpp etc. ). It doesn't know about files *.citrus, so to search in such files you must use -a
cmd line switch:
$ack -a -G '\.citrus$' foo
1.d/1.citrus
1:foo_bar