Re: Colorize matches for git log --grep=pattern?
- From
Sebastian Schuberth <sschuberth@gmail.com>
- Date
- Nov 1, 2017, 19:54 UTC
- Message-ID
- <CAHGBnuPspJ6xsZ9dymet2Woku3PkD9fCHy2qMj7cLACCF3UXLQ@mail.gmail.com>
- In-Reply-To
- <20171101185026.d4ljyywz3fepgoth@sigill.intra.peff.net>
On Wed, Nov 1, 2017 at 7:50 PM, Jeff King <peff@peff.net> wrote:
Show 8 quoted lines
> The best workaround I could come up with is passing the output through a > highlighting script: > > git log --grep=foo --color | > perl -pe 's/foo/\x1b[1;31m$&\x1b[m/' | > less > > Pretty hacky.
Thanks anyway. I was also considering something like this, but likewise found it to be too hacky.
-- Sebastian Schuberth