Summary: | sys-apps/less doesn't show colors for user request. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Naray Gabor <xlii> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | trivial | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Naray Gabor
2008-02-24 17:15:20 UTC
grep --colour=auto only uses colouring when the output is a tty. When you pipe the output through another program, colours will be suppressed. The same thing will happen if you pass the output to cat. But this happens not only with grep, but with any other colored input i redirect. emerge, eix, or try to save it. So this is how colors are handled? if not going to tty, then suppressed? What reason has less -R then? Do you think this is a good solution? Well maybe for you it is. But not for me. But then, could you give me a guide where to start to make gentoo not to delete color codes from output if not going to tty? This could result a nice review of emerge log-s, eix lists - where colors are VERY important -, greps and stuff like that. I know this will lead to unexpected results for example in pattern matching. Will take the risk. But still I don't think this is the way it should work. most utilities out there will disable color output automatically if the output is not a tty. this is the expected design behavior. if you dislike it, you can force each utility to display color in the output. read the relevant documentation for each utility (such as grep --color=always). there's nothing to be "fixed" here. |