{"thread":{"id":"20111","subject":"odd behavior with export LESS=i","startedAt":"2009-07-14T17:18:52Z","lastAt":"2009-07-14T17:32:04Z","messageCount":3,"participants":["E R","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"117970","messageId":"3a69fa7c0907141018l4f6fb773o219b6a18effc393d@mail.gmail.com","threadId":"20111","inReplyTo":null,"subject":"odd behavior with export LESS=i","fromName":"E R","fromEmail":"pc88mxer@gmail.com","sentAt":"2009-07-14T17:18:52Z","receivedAt":"2009-07-14T17:18:52Z","isPatch":false,"sender":{"key":"pc88mxer@gmail.com","avatar":null},"body":"Is this a problem with less or with git?\n\n>From the shell if I run:\n\nexport LESS\nLESS=i git log\n\nthen I see things like ESC[33m instead of colored text.\n\nIf I run:\n\nunset LESS\ngit log\n\nthen I get colored text.\n\nNote that the environment variable LESS is used to pass default\ncommand line switches to less.\n"},{"id":"117973","messageId":"3a69fa7c0907141028u172fc32eg87db0364a189d94c@mail.gmail.com","threadId":"20111","inReplyTo":"3a69fa7c0907141018l4f6fb773o219b6a18effc393d@mail.gmail.com","subject":"Re: odd behavior with export LESS=i","fromName":"E R","fromEmail":"pc88mxer@gmail.com","sentAt":"2009-07-14T17:28:02Z","receivedAt":"2009-07-14T17:28:02Z","isPatch":false,"sender":{"key":"pc88mxer@gmail.com","avatar":null},"body":"Ok - I've just read the git-config man page (the section on\ncore.pager) which explains everything..\n\nOn Tue, Jul 14, 2009 at 12:18 PM, E R<pc88mxer@gmail.com> wrote:\n> Is this a problem with less or with git?\n>\n> From the shell if I run:\n>\n> export LESS\n> LESS=i git log\n>\n> then I see things like ESC[33m instead of colored text.\n>\n> If I run:\n>\n> unset LESS\n> git log\n>\n> then I get colored text.\n>\n> Note that the environment variable LESS is used to pass default\n> command line switches to less.\n>\n"},{"id":"117971","messageId":"fabb9a1e0907141032o6b1aac51yb42a640249f04050@mail.gmail.com","threadId":"20111","inReplyTo":"3a69fa7c0907141018l4f6fb773o219b6a18effc393d@mail.gmail.com","subject":"Re: odd behavior with export LESS=i","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-07-14T17:32:04Z","receivedAt":"2009-07-14T17:32:04Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Tue, Jul 14, 2009 at 10:18, E R<pc88mxer@gmail.com> wrote:\n> export LESS\n> LESS=i git log\n>\n> then I see things like ESC[33m instead of colored text.\n\nThat's because (as you could read in less'\nway-too-long-for-a-damn-pager man page), you did not specify the magic\n\"-R\" make-everything-work-like-it-should option, which turns on the\ndisplay of escape sequences (which are used to color your terminal).\n\n\n> If I run:\n>\n> unset LESS\n> git log\n>\n> then I get colored text.\n\nThat's because if not set, git default to setting LESS to -FXRS (which\nincludes the -R option). Solution is to either not set LESS, or to\ninclude -R if that's indeed what you want.\n\n-- \nCheers,\n\nSverre Rabbelier\n"}]}