1 |
Den 01.10.2019 13:28, skrev Dr Rainer Woitok: |
2 |
> Greetings, |
3 |
> |
4 |
> having freshly erm ... converted from Ubuntu to Gentoo and thus being an |
5 |
> absolute Gentoo newbie I'm desparately looking for a way to get rid of |
6 |
> all the colour in the output produced by "emerge" but also by "qlist", |
7 |
> "eix", "e-file" and so on. |
8 |
> |
9 |
> Is there a way to globally configure this for all these commands? I've |
10 |
> already added 'NOCLOR="false"' to my "make.conf" file but this doesn't |
11 |
> seem to do the trick. Do I really have to remember for each call to one |
12 |
> of these commands to disable colour individually and in addition have to |
13 |
> remember what's the correct "nocolor" option for the command at hand? |
14 |
> |
15 |
> Any pointers welcome ... :-) |
16 |
|
17 |
I've got this in make.conf, which gets me part-way there: |
18 |
|
19 |
CMAKE_COLOR_MAKEFILE=OFF |
20 |
NOCOLOR="true" |
21 |
GCC_COLORS="" |
22 |
|
23 |
I've also got this in /usr/local/bin/rustc and symlinked to |
24 |
/usr/local/bin/cargo: |
25 |
|
26 |
----/usr/local/bin/rustc:----#!/usr/bin/perlmy @newargs=();my $skipnext=0;my $me=$0;$me =~ |
27 |
s(.*\/)();push @newargs, "--color";push @newargs, "never";foreach $arg |
28 |
(@ARGV) { if($arg eq "--color"){ $skipnext =1; } |
29 |
elsif($skipnext == 1){ $skipnext = 0; } else { # any arg EXCEPT |
30 |
color gets passed along verbatim push @newargs, $arg |
31 |
}}exec("/usr/bin/${me}",@newargs); |
32 |
--- |
33 |
|
34 |
This last trick could probably be used for other commands as well |
35 |
(modulo specific argument) |