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, 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 “–”
  3. Verify with “ack-grep –help-types | grep php”

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

Leave a comment

Your email address will not be published.