[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [feature request] Colouring matches in --result=grep outputs

From: Jason Hood
Subject: Re: [feature request] Colouring matches in --result=grep outputs
Date: Fri, 28 Jun 2013 19:13:33 +1000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

On 31/05/2013 19:10, Shigio YAMAGUCHI wrote:
> On Fri, 31 May 2013 12:04:26 +0800
> Leo Liu <address@hidden> wrote:
>> I like the brief output from --result=grep. Unfortunately it is not easy
>> to identify the tag found in each line. It'd be nice if the matched tag
>> is coloured, for example, like 'grep' with '--color'.
> I have added the option to the TODO list.
> (http://www.gnu.org/software/global/plans.html)

Find attached a patch that adds -C (--color, --colour) to do it.  It
uses GREP_COLORS (mt or ms) or GREP_COLOR to define the color; default
is bold red text.  It only works with -g, whatever the output.  The
Windows version will require ANSICON (ANSI32.dll), but I'll include
that in my binaries (global.exe with colour and fixed idutils and
--single-update, along with gtags.exe with fixed idutils are here:

The patch also fixes literal matching at the end of the file (-V
wasn't including the last line, nor did it properly test/display the
last line if it didn't have a newline).


Attachment: color.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]