Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935729 - >=sys-apps/less-643 using dev-python/pygments-2.17.2: slow coloring
Summary: >=sys-apps/less-643 using dev-python/pygments-2.17.2: slow coloring
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-08 05:39 UTC by Tom
Modified: 2024-07-09 12:48 UTC (History)
0 users

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


Attachments
new lesspipe script (lesspipe.tar.gz,16.96 KB, application/gzip)
2024-07-08 05:39 UTC, Tom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom 2024-07-08 05:39:59 UTC
Created attachment 897312 [details]
new lesspipe script

Hello,

since sys-apps/less-643-r[12] is using dev-python/pygments-2.17.2 for color
output, viewing files without a suffix needs up to a second before they are
displayed, but colors would be nice...

Just try
        less /usr/share/misc/magic/*
and walk through the list of files using :n and :p

While having a look at /usr/bin/lesspipe, I've decided to re-write most parts
of this script, in order to:
- fix the problem with slow execution,
- support many more suffixes, not only for colorization,
- fully handle compressed files.

I've tried to find some nice looking colors, but they aren't as nice as
those used by vim...

The new lesspipe script is heavily commented, so please RTFS.
All my added comments are marked with (ThMO) in order to distinguish them from
the original comments.

Notice: I'm working on a 80x25 terminal console, therefore my lines do not
exceed 80 columns - furthermore I never use tabs at the beginning of a line,
for obvious reasons.

So please execute  :se ts=2  inside vim for proper indentation.
If you're willing to accept my changes, please feel free to:
- re-indent as you like it,
- remove comments at your will.

THX for listening so far.

CU Tom