Den 01.10.2019 13:28, skrev Dr Rainer Woitok:
Greetings,

having freshly erm ... converted from Ubuntu to Gentoo and thus being an
absolute Gentoo newbie  I'm desparately looking  for a way to get rid of
all the colour in the output  produced by "emerge"  but also by "qlist",
"eix", "e-file" and so on.

Is there a way to globally configure this for all these commands?   I've
already added  'NOCLOR="false"'  to my "make.conf" file but this doesn't
seem to do the trick.  Do I really have to remember for each call to one
of these commands to disable colour individually and in addition have to
remember what's the correct "nocolor" option for the command at hand?

Any pointers welcome ... :-)

I've got this in make.conf, which gets me part-way there:

CMAKE_COLOR_MAKEFILE=OFF
NOCOLOR="true"
GCC_COLORS=""

I've also got this in /usr/local/bin/rustc and symlinked to /usr/local/bin/cargo:

----/usr/local/bin/rustc:----#!/usr/bin/perlmy @newargs=();my $skipnext=0;my $me=$0;$me =~ s(.*\/)();push @newargs, "--color";push @newargs, "never";foreach $arg (@ARGV) {    if($arg eq "--color"){    $skipnext =1;    } elsif($skipnext == 1){    $skipnext = 0;    } else { # any arg EXCEPT color gets passed along verbatim     push @newargs, $arg    }}exec("/usr/bin/${me}",@newargs);
---

This last trick could probably be used for other commands as well (modulo specific argument)



Reply via email to