From owner-svn-src-head@freebsd.org Thu Apr 6 03:38:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 143CFD2F149; Thu, 6 Apr 2017 03:38:52 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E6D92BA8; Thu, 6 Apr 2017 03:38:51 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (106-69-236-122.dyn.iinet.net.au [106.69.236.122]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v363cj1F024377 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 5 Apr 2017 20:38:49 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r316491 - head/usr.bin/grep To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704041417.v34EHo3h010715@repo.freebsd.org> From: Julian Elischer Message-ID: Date: Thu, 6 Apr 2017 11:38:40 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201704041417.v34EHo3h010715@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 03:38:52 -0000 hard coded colours?? in 2017? On 4/4/17 10:17 pm, Ed Maste wrote: > Author: emaste > Date: Tue Apr 4 14:17:50 2017 > New Revision: 316491 > URL: https://svnweb.freebsd.org/changeset/base/316491 > > Log: > bsdgrep: revert color changes from r316477 > > r316477 changed the color output to match exactly the in-tree GNU grep, > but introduces unnecessary escape sequences. > > Submitted by: Kyle Evans > Reported by: ache > MFC after: 1 month > MFC with: r316477 > > Modified: > head/usr.bin/grep/util.c > > Modified: head/usr.bin/grep/util.c > ============================================================================== > --- head/usr.bin/grep/util.c Tue Apr 4 13:41:50 2017 (r316490) > +++ head/usr.bin/grep/util.c Tue Apr 4 14:17:50 2017 (r316491) > @@ -512,13 +512,13 @@ printline(struct str *line, int sep, reg > fwrite(line->dat + a, matches[i].rm_so - a, 1, > stdout); > if (color) > - fprintf(stdout, "\33[%sm", color); > + fprintf(stdout, "\33[%sm\33[K", color); > > fwrite(line->dat + matches[i].rm_so, > matches[i].rm_eo - matches[i].rm_so, 1, > stdout); > if (color) > - fprintf(stdout, "\33[00m\33[K"); > + fprintf(stdout, "\33[m\33[K"); > a = matches[i].rm_eo; > if (oflag) > putchar('\n'); > >