I needed to add some more file types for ack-grep to find / search when I’m looking for PHP code that resides in files with non-standard extensions (e.g. something.def, something.inc etc).
Annoyingly the documentation appears pretty sparse, so here’s how to e.g. add “.inc” as a PHP file type
- Create ~/.ackrc
- Add “–type-add=php=.inc”
- Verify with “ack-grep –help-types | grep php”
The use of = signs seemed to trip me up initially.