Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274457 - sys-apps/less - enabling syntax highlighting
Summary: sys-apps/less - enabling syntax highlighting
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-17 06:55 UTC by Jaak Ristioja
Modified: 2010-02-15 09:35 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 Jaak Ristioja 2009-06-17 06:55:30 UTC
Please set LESSCOLOR=yes as default in /etc/env.d/70less or add an information notice to the ebuild so the users can easily find how to switch this on or off. Thanks.
Comment 1 SpanKY gentoo-dev 2009-06-19 11:12:09 UTC
`lesspipe.sh --help` already clearly documents things

defaulting to on is not acceptable -- see Bug 188835 exactly as referenced in the colorization code already
Comment 2 Jaak Ristioja 2009-06-19 17:38:00 UTC
I had no idea such a thing as lesspipe.sh existed. I wonder how many users do.

Correct me if I am mistaken on this, but I'm quite sure that syntax highlighting was enabled out of the box in the past. Perhaps I just didn't notice, but I still think that it's important to notify users about such changed behaviour. Regardless of bug 188835, many users may still want syntax highlighting with less.

I think it would do good (happier users) to make the trivial change of adding a few lines to the ebuild stating how to enable syntax highlighting, e.g.

elog "Syntax highlighting is disabled by default, because it may take a long time for big files (bug #188835). If you still want to enable syntax highlighting for your user, add the following line to your ~/.bash_profile"
elog " "
elog "  export LESSCOLOR=yes"
elog " "
elog "To enable syntax highlighting for all users, add the following line to /etc/env.d/70less"
elog " "
elog "  LESSCOLOR=yes"

All I ask is to take this under consideration. Thanks.
Comment 3 SpanKY gentoo-dev 2010-02-14 17:11:15 UTC
the ebuild now suggests people run `lesspipe -h` for color info.  i dont want to duplicate this info in the ebuilds and the script itself.
Comment 4 Jaak Ristioja 2010-02-15 09:35:59 UTC
Perhaps it were a better idea to instruct people to install a separate syntax highlighter (e.g. app-text/highlight) and add something like the following to their environment to get highlighting:
    LESSCOLOR=yes
    LESSCOLORIZER=highlight