I'll engage in some expectation management: ag doesn't cover all uses of Ack. I made ag because I loved Ack, but it wasn't fast enough for my needs. For the features of Ack that I use, ag is interchangeable. For features I don't use... not so much. Also, since the release of Ack 2.0, some behaviors and command line options have differed slightly.
If you want to know why ag is so fast, there's a summary in the GitHub README.[1] I've also written a few blog posts on the subject.[2]
I'm not sure how valid the comparison benchmark is:
Ack and Ag found the same results, but Ag was 34x faster
(3.2 seconds vs 110 seconds). My ~/code directory is about
8GB. Thanks to git/hg/svn-ignore, Ag only searched 700MB of that.
Searching less data definitely is going to take less time!
While "would you rather type" examples are OK, I wish more people would learn how to use their shell's short-cuts and trivial scripting.
Whenever you find yourself repeatedly running long and awkward commands that you wish were shorter, you ought to think about converting them into an alias or a script.
Designed as a replacement for all of the use cases of Ack. Is even faster.