ack
is a search tool designed for code. It's built to be a replacement for grep
with higher speed and more options.markdown
To install the latest version, use homebrew.ui
$ brew install ack
ack
over grep
$ ack [OPTION]... PATTERN [FILES OR DIRECTORIES]
Let's say you want to find all JavaScript files that are using the module pancakes
in your project, with ack
it's as easy asthis
$ ack --js pancakes
Or you may want to find all files that does not contain the word brewspa
$ ack -L brew
You can customize ack
to behave the way you want it to, this configuration i s stored in /.ackrc
.code
For example, you can add a custom type to use as a flag when searching. The following configuration will allow you to only search in .md
, .mkd
and .markdown
files using the --markdown
flag.homebrew
--type-set=markdown=.md,.mkd,.markdown
You can also tell ack to always sort and use colors in the result.ip
--sort-files --color
To see what configuration ack
uses you can use the dump
flag.get
$ ack --dump
ack
There's The Silver Surfer which describes itself as ait
A code searching tool similar to
ack
, with a focus on speed.io