lkml.org 
[lkml]   [2017]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: Change format of --color argument to --color[=WHEN]
On Mon, Jun 05, 2017 at 04:10:30PM -0700, Joe Perches wrote:
> On Mon, 2017-06-05 at 18:27 -0400, John Brooks wrote:
> > The boolean --color argument did not offer the ability to force colourized
> > output even if stdout is not a terminal.
>
> OK, but why is colorizing output not to terminals desired?

* You may post-process the output somehow. grep, sed, some highlighter...
* The output may go to less -R, ansi2html, etc.

I've made a tool that does what you want, "pipetty" (Debian package
colorized-logs, in stretch and jessie-backports), but that's a dirty hack.
Lying about isatty() works for programs that check STDOUT but it's notorious
to instead look at STDIN, which can't be fooled in a reliable way. Thus,
it's better to standardize on --color={always,auto,never}.


Meow!
--
⢀⣴⠾⠻⢶⣦⠀ A tit a day keeps the vet away.
⣾⠁⢰⠒⠀⣿⡁
⢿⡄⠘⠷⠚⠋⠀ (Rejoice as my small-animal-murder-machine got unbroken after
⠈⠳⣄⠀⠀⠀⠀ nearly two years of no catch!)

\
 
 \ /
  Last update: 2017-06-12 00:38    [W:0.188 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site