Every repository with this icon (
Every repository with this icon (
Recognizing Files
Henrik pointed out that ack was not searching his ‘haml’ files. This is because ack doesn’t recognize .haml files as interesting so it skips them. Adding a new filetype to ack is simple but non-obvious.
For example, to tell ack to recognize haml files as ruby sources while searching for ‘some_text’ you would do this on the command line:
ack --type-add ruby=haml some_text
Permanently adding haml as a type requires that you put that—type-add into a .ackrc file. I’d recommend you put it into your $HOME/.ackrc file rather than in a per-project .ackrc because adding haml as a file type is probably something you want across projects.
The only niggle is that—type-add is actually parsed as 2 arguments in sequence, not one argument. So you can’t put them all on one line.
Here’s my suggested $HOME/.ackrc file:
--type-add
ruby=haml




