« Vault 4.1 / Fortress 1.1 beta | Main | SourceGear sponsoring Tucson.NET in December »

Vault! Fortress! Ack!

I've fallen in love with a new tool known as ack. It's basically grep, the way I want grep to work when coding:

  • Full Perl regular expressions
  • Iterates over directories by default
  • Skips source control directories (q.v.)
  • Easily restricted to certain file types

So if I'm searching a tree of Perl files, instead of something like:

grep pattern $(find . -name '*.pl' -or -name '*.pm' -or -name '*.pod' | \
  grep -v _sgbak)

(to find Perl program, module, and POD files, skipping anything in Vault/Fortress _sgbak folders), I can just say:

ack --perl pattern

And yes, as of version 1.74, ack includes Vault and Fortress in its list of supported version control tools. So if I want to see references to the explodeMinion46 function, I can just say:

ack explodeMinion46

To recursively search my current directory, avoiding backup files along the way.

There are a number of other options, including configuring your own exclusions, etc. on the fly -- but for me, the out-of-the-box behavior is now exactly what I want.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on November 29, 2007 8:21 AM.

The previous post in this blog was Vault 4.1 / Fortress 1.1 beta.

The next post in this blog is SourceGear sponsoring Tucson.NET in December.

Many more can be found on the main index page or by looking through the archives.

Paul Roub
SourceGear
Work:
115 North Neil St. #408
Champaign, IL 61820-4024
USA
work: +1-217-356-0105 x722