View previous topic :: View next topic |
Author |
Message |
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Tue May 28, 2002 8:44 pm Post subject: Disable colored output temporarily? |
|
|
For the most part, I like the colored console output that Gentoo uses. However, there are a few cases where it's a pain. For example, if I want to do the following:
Code: | emerge -ep package_foo > package_list.txt |
I'm going to get a file full of ANSI color escape characters in addition to the expected output. I realize I can remove these fairly easily through a regex find/replace, but I'd prefer not to have to do that.
What's the easiest way to disable color output for just that command and not the entire console session?
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
arkane l33t
Joined: 30 Apr 2002 Posts: 918 Location: Phoenix, AZ
|
Posted: Tue May 28, 2002 9:46 pm Post subject: |
|
|
there is a variable in the /etc/make.globals called "NOCOLOR" that controls whether emerge will use color or not.
I just tested it and it successfully turned off color by doing:
Code: |
export NOCOLOR=true ; emerge -pu world
|
No ansi escape sequences.
Is that what your looking for?
PS: after that, you can always set NOCOLOR back to false per default. |
|
Back to top |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Tue May 28, 2002 9:59 pm Post subject: |
|
|
arkane wrote: | Code: |
export NOCOLOR=true ; emerge -pu world
|
No ansi escape sequences.
Is that what your looking for?
|
Personally, I think it is better to do: Code: | NOCOLOR=true emerge -ep world |
With my method, we only set NOCOLOR for the duration of the emerge function, other wise the export will carry over till it is unset, or the shell is closed.
(klieber: this sounds like a post to submit to the Tips & Tricks forum if this is/when you find the solution.) _________________ - Kyle Manna
Please, please SEARCH before posting.
There are three kinds of people in the world: those who can count, and those who can't. |
|
Back to top |
|
|
arkane l33t
Joined: 30 Apr 2002 Posts: 918 Location: Phoenix, AZ
|
Posted: Tue May 28, 2002 10:13 pm Post subject: |
|
|
Quote: |
Personally, I think it is better to do: Code: | NOCOLOR=true emerge -ep world |
With my method, we only set NOCOLOR for the duration of the emerge function, other wise the export will carry over till it is unset, or the shell is closed.
|
Or that way
I completely forgot about that functionality. |
|
Back to top |
|
|
|