[ANN] Bzr grep plugin

Michael Ellerman michael at ellerman.id.au
Thu Mar 23 13:25:27 GMT 2006


Hey fellas,

I've been wanting this for a while, ever get annoyed by "Binary file
foo.pyc matches" in your grep results? Well be annoyed no longer!

concordia ~/src/bzr/upstream/trunk$ bzr grep meep -- -i
bzrlib/tests/blackbox/test_log.py:       
self.build_tree(['hello.txt', 'goodbye.txt', 'meep.txt'])
bzrlib/tests/blackbox/test_log.py:        self.runbzr("add meep.txt")
bzrlib/tests/blackbox/test_log.py:        self.runbzr("commit -m
message3 meep.txt")

You'll notice it's a little weird, in that in order to pass options to
grep you use '--' and pass them after the pattern. But whatever.

It takes a file list too:

concordia ~/src/bzr/upstream/trunk$ bzr grep bug -- -c NEWS
13
concordia ~/src/bzr/upstream/trunk$ bzr grep bug -- -c README  NEWS
NEWS:13
README:0

Grab it from:

http://michael.ellerman.id.au/files/bzr/grep

cheers




More information about the bazaar mailing list