3

How do I add a new filetype to ack, with version 2.04 (ack-2.04-single-file). I am using the following command (Is there any way to search in filetypes not recognized by ack?), but I receive an error.

$ ack --type-set=input=.i
ack-2.04-single-file: No regular expression found.
Community
  • 1
  • 1
slaughter98
  • 1,759
  • 14
  • 20

1 Answers1

2

Using the following does what I wanted:

--type-add=input:ext:i

I found the answer by creating a .ackrc file with:

ack --create-ackrc
slaughter98
  • 1,759
  • 14
  • 20
  • I'm using --type-add=zcml:ext:zcml --type=zcml only works on the command line, not the .ackrc file. Not sure why – Danimal Sep 24 '15 at 11:31