Jason Cooper wrote:
Jason Stubbs ([EMAIL PROTECTED]) scribbled:
On Tuesday 12 April 2005 20:49, A. Khattri wrote:
There really ought to be a --nocolor option for emerge, alongside the
--nospinner option. (I know I could add it to FEATURES in make.conf but I
dont want to do that). I run emerge --sync from cron on my servers - the
email from cron contains a lot of control codes.
Well, that's three people saying it should be implemented but no offerings off
any code yet... Here's my solution: Add NOCOLOR="true" to your crontab.
ehh, challenge accepted. :)
initial patch attached. This is against 'emerge' from
sys-apps/portage-2.0.51.19.
it adds '--nocolor' with the abbreviation '-r'. Looks like my tabs
might be off, let me know if they are.
I've never looked at this code before, nor this language. So I'm sure I
screwed it up...
Cooper.
what about:
if (not sys.stdout.isatty()) \
or ("--nocolor" in myopts) \
or (portage.settings["NOCOLOR"] in ["yes","true"]):
or adapted similar in your patch. using "and" inverse the logic.
--
No problem is so formidable that you can't walk away from it.
~ Charles M. Schulz
But sometimes run fast is better
~ Francesco R.
--
gentoo-user@gentoo.org mailing list