git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: odd behavior with export LESS=i

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
Jul 14, 2009, 17:32 UTC
Message-ID
<fabb9a1e0907141032o6b1aac51yb42a640249f04050@mail.gmail.com>
In-Reply-To
<3a69fa7c0907141018l4f6fb773o219b6a18effc393d@mail.gmail.com>
Heya,
On Tue, Jul 14, 2009 at 10:18, E R<pc88mxer@gmail.com> wrote:
> export LESS
> LESS=i git log
>
> then I see things like ESC[33m instead of colored text.

That's because (as you could read in less' way-too-long-for-a-damn-pager man page), you did not specify the magic "-R" make-everything-work-like-it-should option, which turns on the display of escape sequences (which are used to color your terminal).

Show 6 quoted lines
> If I run:
>
> unset LESS
> git log
>
> then I get colored text.

That's because if not set, git default to setting LESS to -FXRS (which includes the -R option). Solution is to either not set LESS, or to include -R if that's indeed what you want.

-- 
Cheers,

Sverre Rabbelier
Previous: E R
Message 3 of 3 in “odd behavior with export LESS=i”
  1. E RJul 14, 2009
  2. E RJul 14, 2009
  3. Sverre RabbelierJul 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.