From: "Håkon Alstadheim" <hakon@alstadheim.priv.no>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Globally disabling colour
Date: Tue, 1 Oct 2019 16:07:55 +0200 [thread overview]
Message-ID: <d60d943b-067e-de18-653c-41d060229d6d@alstadheim.priv.no> (raw)
In-Reply-To: <23955.14427.459481.904314@tux.local>
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)
next prev parent reply other threads:[~2019-10-01 14:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 11:28 [gentoo-user] Globally disabling colour Dr Rainer Woitok
2019-10-01 11:32 ` Arve Barsnes
2019-10-01 11:42 ` Mick
2019-10-01 14:07 ` Håkon Alstadheim [this message]
2019-10-02 9:01 ` Dr Rainer Woitok
2019-10-02 14:50 ` Håkon Alstadheim
2020-01-05 12:06 ` Dr Rainer Woitok
2020-01-05 12:17 ` Robert Bridge
2020-01-05 12:44 ` Dr Rainer Woitok
2020-01-05 13:02 ` Robert Bridge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d60d943b-067e-de18-653c-41d060229d6d@alstadheim.priv.no \
--to=hakon@alstadheim.priv.no \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox