View previous topic :: View next topic |
Author |
Message |
teika Tux's lil' helper

Joined: 19 Feb 2011 Posts: 121 Location: YYYY-MM-DD, period. Have you ever used the Internet?
|
Posted: Tue Oct 27, 2020 12:55 am Post subject: [patch] portage-utils: Colored output to files |
|
|
As of app-portage/portage-utils-0.90,
$ q
does print in color, but if you do
$ q > file
it will be colorless. I wrote a quick patch that makes outputs always in color, unless you pass --nocolor.
Get it here. Save it as /etc/portage/patches/app-portage/portage-utils/notty-color.patch, re-emerge, and you're done.
Don't send it to bugzilla and annoy Gentoo developers. Once you enhance it to
--color=always/auto/never
i.e. as "ls (1)" does, I guess it'll be ok.
Regards. _________________ Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudgery: topic 865313
Be kind to the disadvantaged. That includes T***p supporters, and those hypocrites that called Trump supporters "deplorable." |
|
Back to top |
|
 |
Ionen Veteran

Joined: 06 Dec 2018 Posts: 1620
|
Posted: Tue Oct 27, 2020 1:13 am Post subject: |
|
|
If want to avoid patches in situations like that, can always force it with the script command (from util-linux), like: Code: | script -aefq /dev/null -c "quse -Dvp firefox" | grep www-client > stillcolored | Can also replace /dev/null by the actual file and it'll work more like bin/tee. Given it makes the command a bit nasty, makes more sense with an alias/wrapper.
Not that I don't agree portage-utils needs an option to control this rather than be auto-detection-only. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|