* odd behavior with export LESS=i
@ 2009-07-14 17:18 E R
2009-07-14 17:28 ` E R
2009-07-14 17:32 ` Sverre Rabbelier
0 siblings, 2 replies; 3+ messages in thread
From: E R @ 2009-07-14 17:18 UTC (permalink / raw)
To: git
Is this a problem with less or with git?
>From the shell if I run:
export LESS
LESS=i git log
then I see things like ESC[33m instead of colored text.
If I run:
unset LESS
git log
then I get colored text.
Note that the environment variable LESS is used to pass default
command line switches to less.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: odd behavior with export LESS=i
2009-07-14 17:18 odd behavior with export LESS=i E R
@ 2009-07-14 17:28 ` E R
2009-07-14 17:32 ` Sverre Rabbelier
1 sibling, 0 replies; 3+ messages in thread
From: E R @ 2009-07-14 17:28 UTC (permalink / raw)
To: git
Ok - I've just read the git-config man page (the section on
core.pager) which explains everything..
On Tue, Jul 14, 2009 at 12:18 PM, E R<pc88mxer@gmail.com> wrote:
> Is this a problem with less or with git?
>
> From the shell if I run:
>
> export LESS
> LESS=i git log
>
> then I see things like ESC[33m instead of colored text.
>
> If I run:
>
> unset LESS
> git log
>
> then I get colored text.
>
> Note that the environment variable LESS is used to pass default
> command line switches to less.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: odd behavior with export LESS=i
2009-07-14 17:18 odd behavior with export LESS=i E R
2009-07-14 17:28 ` E R
@ 2009-07-14 17:32 ` Sverre Rabbelier
1 sibling, 0 replies; 3+ messages in thread
From: Sverre Rabbelier @ 2009-07-14 17:32 UTC (permalink / raw)
To: E R; +Cc: git
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).
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-14 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-14 17:18 odd behavior with export LESS=i E R
2009-07-14 17:28 ` E R
2009-07-14 17:32 ` Sverre Rabbelier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).