From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from <gentoo-user+bounces-55296-garchives=archives.gentoo.org@gentoo.org>) id 1GnfT2-0003i9-LW for garchives@archives.gentoo.org; Fri, 24 Nov 2006 18:08:05 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kAOI5tJg008358; Fri, 24 Nov 2006 18:05:55 GMT Received: from Princeton.EDU (postoffice02.Princeton.EDU [128.112.130.38]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kAOI3rDm013306 for <gentoo-user@lists.gentoo.org>; Fri, 24 Nov 2006 18:03:53 GMT Received: from smtpserver2.Princeton.EDU (smtpserver2.Princeton.EDU [128.112.129.148]) by Princeton.EDU (8.13.8/8.13.8) with ESMTP id kAOI3qQP016936 for <gentoo-user@lists.gentoo.org>; Fri, 24 Nov 2006 13:03:52 -0500 (EST) Received: from sep.dynalias.net (fez.Princeton.EDU [128.112.129.190]) (authenticated bits=0) by smtpserver2.Princeton.EDU (8.12.9/8.12.9) with ESMTP id kAOI3pWE010751 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for <gentoo-user@lists.gentoo.org>; Fri, 24 Nov 2006 13:03:52 -0500 (EST) Received: by sep.dynalias.net (Postfix, from userid 1001) id 2AEF53A325; Fri, 24 Nov 2006 13:04:09 -0500 (EST) Date: Fri, 24 Nov 2006 13:04:09 -0500 From: Willie Wong <wwong@Princeton.EDU> To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] less and colourisation Message-ID: <20061124180409.GA932@princeton.edu> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <1164331344.2379.19.camel@localhost> Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1164331344.2379.19.camel@localhost> User-Agent: Mutt/1.5.13 (2006-08-11) X-Archives-Salt: ab992308-4bac-480d-9799-1e8182d501c0 X-Archives-Hash: a5ebb5e19e957becb9387e19a9bdb080 On Fri, Nov 24, 2006 at 09:22:24AM +0800, Penguin Lover W.Kenworthy squawked: > I recently had cause to use "less" from a real console, not an xterm and > found that it really does colourise text. It has never done this in an > xterm - how do I turn it on? "man" isnt being very helpful here :( > > BillK My best guess is the -R option: -R or --RAW-CONTROL-CHARS Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is main- tained correctly in most cases. ANSI "color" escape sequences are sequences of the form: ESC [ ... m where the "..." is zero or more color specification char- acters For the purpose of keeping track of screen appear- ance, ANSI color escape sequences are assumed to not move the cursor. You can make less think that characters other than "m" can end ANSI color escape sequences by setting the environment variable LESSANSIENDCHARS to the list of characters which can end a color escape sequence. And you can make less think that characters other than the stan- dard ones may appear between the ESC and the m by setting the environment variable LESSANSIMIDCHARS to the list of characters which can appear. HTH, W -- (04:01:59) W: yep (04:02:02) W: I love linux (04:02:15) NJYWT: I love penguins Sortir en Pantoufles: up 91 days, 11:36 -- gentoo-user@gentoo.org mailing list