by lindgrenj6 · 9y ago · 0 comments
But by far the most time saving feature I have is the type searching functionality in it! For example, one can type 'ack --java System.out' and it will search ONLY the java files! No more 'find . -name *.java -exec grep -Hni System.out {} \;'. And you can add custom types easily through your .ackrc, it is a very well put together piece of software.
(PS: If you're trying it, definitely try out 'ack --bar')
https://github.com/monochromegane/the_platinum_searcher
Since it's pure Go, there's your static binary which makes it easily deployable again.
While ack is great, I just want to point at you could easily do 'grep -rHni System.out --include \*.java'. Granted it's still more words, but the '--include' directive (which you can specify multiple of) is really great for quickly modifying a grep search to restrict to certain filetypes. No need for find/exec :)