Ack

ack is a wonderful replace for grep.

.ackrc:

--type-add=php=.tpl
--ignore-dir=external
#make sure ack knows how to search common filetypes used in rails projects
--type-add=css=scss
--type-add=ruby=.haml,.rselm,.feature,.ru,.lock
--type-set=coffeescript=.coffee
--type-set=coffee=.coffee

#make sure ack knows how to search common filetypes used in node.js projects
--ignore-dir=node_modules
--type-set=coffee=.coffee
--type-set=jade=.jade
--type-set=feature=.feature
--type-set=json=.json

We can have per directory or per project .ackrc by putting:

export ACKRC=".ackrc"

into your .bashrc or .bash_profile file.

If we want to ignore the .ackrc file with the —noenv option:

ack --noenv pattern

http://beyondgrep.com/documentation/

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License