Reviews by Corey D. Hollaway



ack (1.74) *****

I consider ack to be much more useful than grep because:
- Perl regular expressions
- Coloring of not only the search term, but the filename
- The ability to group (e.g., instead of:
myfile.txt: this what found
myfile.txt: this was also found
myfile.txt: this was also also found in the same file!
you get:
this what found
this was also found
this was also also found in the same file!)

This is what I like to do when searching ebooks and such:
ack --color --group -i '\bsearchTerm\b' | less -R
# ^^ so so so beautiful and readable (because of the colors and unexcessive formatting)

Another point that makes ack so great is the ability to use --passthru to just color the output. Such an ingenius tool! While I haven't used --passthru to color output yet, I'll know I'll be using it soon. Perl regexp + logger coloring == 1337.

There might be issues with wanting to search only certain directories and files that match a regular expression. My solution would be to use find. Something like this (untested):
find -type f ! -regex '.*/bad_dir/.*' \( -name "*.cpp" -o -name "*.h" -o -name "*.crazy" \) -exec ack --text --color --group 'searchThis' '{}' \; | less -R

I do however felt that file extensions shouldn't have anything to do with what is searched, and so I feel like the option --text should be on by default. The --text option forces _all_ text files to be searched -- regardless of file name extension. Sometimes I do searches and I ask myself "why aren't these files matching when they should be (i.e., they _are_ text files)?" -- and then I'm like "ooohh, because I forgot --text" (i.e., their file extensions were not matched by 'ack' to be searchable by default -- e.g., .pdftxt).

So an alias ack='ack --text' in the .bashrc saves the day.

I was surprised ack is not in a Debian package, but a `cpan App::Ack` installed the much appreciated tool. (I forgot to use dh-make-perl *shrugs*.)

ANSIColor (1.12) *****

I love adding color to my xterm. This module makes it so easy with print! Xterm coloring + the power of perl == Supremeness! I'm so glad I didn't have to hardcode the xterm coloring escape codes!