Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156362 - sys-apps/less-394: lesspipe.sh misparses the LESS variable [patch]
Summary: sys-apps/less-394: lesspipe.sh misparses the LESS variable [patch]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-26 15:44 UTC by Benno Schulenberg
Modified: 2006-11-26 16:32 UTC (History)
0 users

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


Attachments
force 'less' to colorize when LESSCOLOR is yes (lesspipe.sh-coloring.patch,824 bytes, patch)
2006-11-26 15:45 UTC, Benno Schulenberg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Schulenberg 2006-11-26 15:44:16 UTC
The lesspipe.sh script only looks in $LESS for a stand-alone -r or -R option, not for r or R grouped together with other options.  To make the script parse LESS in a fully correct way is a bit over the top, in my opinion, so I propose the attached patch.

My LESS has since long been defined as "-ciKMRS -z-2 -#20", so I never saw the automatic coloring by less appear.  Setting LESSCOLOR=yes should simply work.

Also, the text in /usr/share/doc/less-394/README.Gentoo.gz is no longer correct: the default is now to colorize, if LESS contains -r or -R.
Comment 1 Benno Schulenberg 2006-11-26 15:45:49 UTC
Created attachment 102809 [details, diff]
force 'less' to colorize when LESSCOLOR is yes
Comment 2 SpanKY gentoo-dev 2006-11-26 16:32:55 UTC
i've added a new keyword "always" so that is no ambiguity here

in cvs, thanks !