Date: Thu, 6 Apr 2017 11:38:40 +0800 From: Julian Elischer <julian@freebsd.org> To: Ed Maste <emaste@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316491 - head/usr.bin/grep Message-ID: <c1791feb-160c-c1af-6fd4-1ba2340a51e1@freebsd.org> In-Reply-To: <201704041417.v34EHo3h010715@repo.freebsd.org> References: <201704041417.v34EHo3h010715@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <kevans91 at ksu.edu> > 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'); > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c1791feb-160c-c1af-6fd4-1ba2340a51e1>