Gentoo Archives: gentoo-user

From: Willie Wong <wwong@×××××××××.EDU>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] less and colourisation
Date: Fri, 24 Nov 2006 18:08:05
In Reply to: [gentoo-user] less and colourisation by "W.Kenworthy"
1 On Fri, Nov 24, 2006 at 09:22:24AM +0800, Penguin Lover W.Kenworthy squawked:
2 > I recently had cause to use "less" from a real console, not an xterm and
3 > found that it really does colourise text. It has never done this in an
4 > xterm - how do I turn it on? "man" isnt being very helpful here :(
5 >
6 > BillK
8 My best guess is the -R option:
11 Like -r, but only ANSI "color" escape sequences are output
12 in "raw" form. Unlike -r, the screen appearance is main-
13 tained correctly in most cases. ANSI "color" escape
14 sequences are sequences of the form:
16 ESC [ ... m
18 where the "..." is zero or more color specification char-
19 acters For the purpose of keeping track of screen appear-
20 ance, ANSI color escape sequences are assumed to not move
21 the cursor. You can make less think that characters other
22 than "m" can end ANSI color escape sequences by setting
23 the environment variable LESSANSIENDCHARS to the list of
24 characters which can end a color escape sequence. And you
25 can make less think that characters other than the stan-
26 dard ones may appear between the ESC and the m by setting
27 the environment variable LESSANSIMIDCHARS to the list of
28 characters which can appear.
30 HTH,
32 W
33 --
34 (04:01:59) W: yep
35 (04:02:02) W: I love linux
36 (04:02:15) NJYWT: I love penguins
37 Sortir en Pantoufles: up 91 days, 11:36
38 --
39 gentoo-user@g.o mailing list


Subject Author
Re: [gentoo-user] less and colourisation "Thomas Rösner" <Thomas.Roesner@××××××××××××××.de>