From: "Håkon Alstadheim" <hakon@alstadheim.priv.no>
To: Dr Rainer Woitok <rainer.woitok@gmail.com>, gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Globally disabling colour
Date: Wed, 2 Oct 2019 16:50:06 +0200 [thread overview]
Message-ID: <be5a2406-f509-0458-4d3e-053edd17b6f7@alstadheim.priv.no> (raw)
In-Reply-To: <23956.26498.577914.589251@tux.local>
[-- Attachment #1: Type: text/plain, Size: 1562 bytes --]
Den 02.10.2019 11:01, skrev Dr Rainer Woitok:
> Hakon,
>
> On Tuesday, 2019-10-01 16:07:55 +0200, you wrote:
>
>> ...
>> I've got this in make.conf, which gets me part-way there:
>>
>> CMAKE_COLOR_MAKEFILE=OFF
>> NOCOLOR="true"
>> GCC_COLORS=""
> I already had the "NOCOLOR" environment variable set (there was a typo
> in my mail, not in my "make.conf" file :-), but the Cmake and Gcc spec-
> ific environment variables were not yet there. Thankyou for this tip.
>
>> I've also got this in /usr/local/bin/rustc and symlinked to
>> /usr/local/bin/cargo:
> This assumes "/usr/local/bin" to precede "/usr/bin" in environment vari-
> able "PATH". Can I set this for Portage only in "make.conf"?
Correct.
>> ----/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);
>> ---
> Alas, this code snippet did not survive mail transmission :-(. Could
> you please run
>
> perl -MMIME::Base64 -ne 'print encode_base64($_)' < /usr/local/bin/rustc
>
> and post (or send me privately) the base64 encoded output? Thankyou.
>
> Sincerely,
> Rainer
Just doing an attachment, so you'll get the charset as well. Don't know
if that gets through to the list.
[-- Attachment #2: rustc --]
[-- Type: text/plain, Size: 456 bytes --]
#!/usr/bin/perl
my @newargs=();
my $skipnext=0;
my $me=$0;
$me =~ s(.*\/)();
#print STDERR "$me\n";
push @newargs, "--color";
push @newargs, "never";
foreach $arg (@ARGV) {
if($arg eq "--color"){
$skipnext =1;
} elsif($skipnext == 1){
$skipnext = 0;
} else {
push @newargs, $arg
}
# print STDERR "$arg\n";
}
exec("/usr/bin/${me}",@newargs);
#foreach $arg (@newargs) {
# print STDERR "$arg\n";
#}
#exit 0;
#exec /usr/bin/rustc "$@"
next prev parent reply other threads:[~2019-10-02 14:50 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
2019-10-02 9:01 ` Dr Rainer Woitok
2019-10-02 14:50 ` Håkon Alstadheim [this message]
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=be5a2406-f509-0458-4d3e-053edd17b6f7@alstadheim.priv.no \
--to=hakon@alstadheim.priv.no \
--cc=gentoo-user@lists.gentoo.org \
--cc=rainer.woitok@gmail.com \
/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