ack-grep config – ackrc – adding new file types

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

  1. Create ~/.ackrc
  2. Add “–type-add=php=.inc”
  3. Verify with “ack-grep –help-types | grep php”

The use of = signs seemed to trip me up initially.


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *