Summary: | sys-apps/less-643-r1: Hard to read blue color on black background and gnome-terminal | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pacho Ramos <pacho> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | bill, holger, josef64, kingjon3377, nbowler, pacho |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=188835 https://bugs.gentoo.org/show_bug.cgi?id=910700 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | screenshot.png |
The previous version, sys-apps/less-633, does not have this problem as it actually obeys the configuration: $ lesspipe --help | grep LESSCOLOR LESSCOLOR env - toggle colorizing of output (no/yes/always; default: no) lesspipe-r3.sh has: ``` # Allow people to flip color off if they dont want it case ${LESSCOLOR} in always) LESSCOLOR=2;; [yY][eE][sS]|[yY]|1|true) LESSCOLOR=1;; [nN][oO]|[nN]|0|false) LESSCOLOR=0;; *) LESSCOLOR=1;; esac if [[ ${LESSCOLOR} != "0" ]] && [[ -n ${LESSCOLORIZER=pygmentize} ]] ; then # 2: Only colorize if user forces it ... # 1: ... or we know less will handle raw codes -- this will # not detect -seiRM, so set LESSCOLORIZER yourself if [[ ${LESSCOLOR} == "2" ]] || [[ " ${LESS} " == *" -"[rR]" "* ]] ; then LESSQUIET=true ${LESSCOLORIZER} "$1" fi fi ``` The problem to me is not the colorizing or not... it is that the palette used is nearly impossible to read in gnome-terminal. On the other hand, the one used in the text console is nice... but I don't know how to use that palette... neither how can I modify it :/ Explicitly setting LESSCOLOR=no works to get rid of this rainbow vomit, so the default is clearly not "no" despite the fact that lesspipe --help says the default is no. It would be nice if it respected NO_COLOR=1 (quite a lot of programs do) http://no-color.org/ |
Created attachment 885013 [details] screenshot.png Hello, I find really hard to read some files due to less using a dark blue color for variables. I can reproduce it when gnome-terminal (3.50.1) is configured with a black background. I have tried to change the color palette, but it doesn't seem to affect less colors at all. I attach a screenshot showing the issue. On the other hand, colors used in text console are much more readable, but I don't know how to get them used when using gnome-terminal. I have also tried to remove pygments package (as it seems to be used by lesspipe when available), but still the same output :/ $ echo $LESSOPEN |lesspipe %s Thanks a lot for your help