Skip to content

Instantly share code, notes, and snippets.

@noahlt
Created October 22, 2011 19:40
Show Gist options
  • Save noahlt/1306403 to your computer and use it in GitHub Desktop.
Save noahlt/1306403 to your computer and use it in GitHub Desktop.
How do I make ack search through Mustache and ERB templates?
--type-set=mustache=.mustache
--type-set=rb=.rb
--type-set=erb=.erb

I work with a large Ruby on Rails project and often have to ack through Mustache and ERB templates. Ack doesn't search files with these extensions by default. To include them in your searches, add these lines to your ~/.ackrc file.

By the way, these lines also allow you to search for only Mustache or only ERB files, using ack --mustache <string> and ack --erb <string> respectively.

["ack","mustache","erb","rc"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment