Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113240 - sys-apps/less: must be a way to disable code colorizing
Summary: sys-apps/less: must be a way to disable code colorizing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-22 04:09 UTC by Yuri Karaban
Modified: 2005-11-22 14:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Karaban 2005-11-22 04:09:25 UTC
Less program pipes code through <b>code2color</b> program if terminal supports
ANSI sequences.

But code2color is not customizable and looks ugly on terminal with light
background (gray).

So I guess it is a good idea to make USE flag which disable code2color. Or maybe
make some flag in LESS environment variable which disables code2color filter.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2005-11-22 07:23:35 UTC
color is only displayed if you use -R which implies your terminal
should support color just fine

i'll add support for checking LESSCOLOR env var
Comment 2 SpanKY gentoo-dev 2005-11-22 07:38:46 UTC
oh, and the color can be configured via one of these:
/etc/code2html.config
~/.code2html.config
file pointed to by $CODE2HTML_CONFIG envvar
Comment 3 Yuri Karaban 2005-11-22 08:00:39 UTC
adding -R to LESS env bad solution (all manual pages will be displayed
incorrectly in this case).

Thank you for suggesting me /etc/code2html.config, I didn't noticed it.
Seems that arbitrary perl code expected.

I'm looking for the best way to disable coloring, when I found I'll post here.
Comment 4 Yuri Karaban 2005-11-22 08:05:38 UTC
Found:

setting /etc/code2html.config to:

%LANGUAGE = ()

will disable coloring.

I'm sorry for bothering you in vain.
Comment 5 SpanKY gentoo-dev 2005-11-22 08:29:47 UTC
manpages show up just fine in my terminals, and i always use -R
Comment 6 SpanKY gentoo-dev 2005-11-22 14:30:27 UTC
added LESSCOLOR and LESSCOLORIZER variables

set LESSCOLOR to 0 to turn off color and LESSCOLORIZER to the binar you want to
use to colorize the code