Em Mon, 8 Apr 2019 16:46:02 +0200 Hans Verkuil <hverkuil@xxxxxxxxx> escreveu: > On 4/8/19 4:41 PM, Philipp Zabel wrote: > > On Mon, 2019-04-08 at 12:44 +0200, Hans Verkuil wrote (paraphrased): > >> On 4/8/19 12:28 PM, Mauro Carvalho Chehab wrote (paraphrased): > > [...] > >>>> [I hate colors] > >>> [I love colors] > >> I could live with [compromise] > > > > Sorry for opening that can of worms :-) > > > > How about doing something similar to 'ls': > > > > - an environment variable V4L_COLORS which, if not set, defaults to > > V4L_COLORS="ok=32:warn=1:fail=1;31" > > - an option --color=always|never|auto, which if not set, defaults to > > auto (check isatty()) > > - to disable colors by default, set V4L_COLORS to "ok=0:warn=0:fail=0" > > > > This would allow to pipe colors into non-terminal stdout like less -R if > > desired, or quickly disable colors with --color=never. > > The pattern could be extended to include dvbv5 log levels or fe tool > > quality levels. > > > > Or alternatively, V4L_COLOR=always|never|auto for easier configuration, > > but with a fixed color scheme? > > I think that is easiest. As long as the color scheme works for both black-on-white > and white-on-black it should be fine. Instead of V4L2_COLOR, perhaps MEDIA_APPS_COLLOR would be a better name, as the same env var could be used also for DVB tools. > > Regards, > > Hans Thanks, Mauro