git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Eric Wong <e@80x24.org>,
	norm@dad.org, Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	l.s.r@web.de, git@vger.kernel.org
Subject: Re: [PATCH] pager: disable color when pager is "more"
Date: Mon, 18 Jul 2016 10:19:09 -0700	[thread overview]
Message-ID: <xmqq8twylv8y.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160718131653.GC19751@sigill.intra.peff.net> (Jeff King's message of "Mon, 18 Jul 2016 07:16:53 -0600")

Jeff King <peff@peff.net> writes:

> On Mon, Jul 18, 2016 at 09:19:07AM +0000, Eric Wong wrote:
>
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> > On Sun, 17 Jul 2016, norm@dad.org wrote:
>> > > 'git diff' outputs escape characters which clutter my terminal. Yes, I
>> > > can sed them out, but then why are they there?
>> > 
>> > Those are most likely the ANSI sequences to add color. Can you call Git
>> > with the --no-color option and see whether the escape characters go away?
>> 
>> Norm: do you have PAGER=more set by any chance?
>> Perhaps changing it to "less" will allow you to preserve colors.
>> 
>> I saw a similar or identical problem during my vacation in
>> FreeBSD-land.  Perhaps the out-of-the-box experience can be
>> improved:
>> 
>> -----8<-----
>> Subject: [PATCH] pager: disable color when pager is "more"
>
> This is the tip of a smaller iceberg. See
>
>   http://public-inbox.org/git/52D87A79.6060600%40rawbw.com/t/#u
>
> for more discussion, and some patches that fix more cases (like "LESS"
> without "R", or "more" that _does_ understand "R"). I think it was
> discarded as being a little too intimate with the details of pagers, but
> it does suck that the out-of-the-box experience on FreeBSD is not good.
> Maybe we should revisit it.

Yup, the three-patch series at

    http://public-inbox.org/git/20140117041430.GB19551%40sigill.intra.peff.net/

would be a safe starting point that is low-impact.  I think what
ended up being discarded was a more elaborate side topic that
started from exploring the possibility of checking if LESS has 'R'
in it to see if it is possible to help people with LESS that does
not allow coloring explicitly exported.

I do not think the approach in the same thread suggested by Kyle

  http://public-inbox.org/git/62DB6DEF-8B39-4481-BA06-245BF45233E5%40gmail.com/

is too bad, either.

  reply	other threads:[~2016-07-18 17:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-16 19:12 Question: Getting 'git diff' to generate /usr/bin/diff output norm
2016-07-16 20:47 ` Perry Hutchison
2016-07-17  7:46   ` Johannes Schindelin
2016-07-19 15:20     ` norm
2016-07-17 12:18 ` René Scharfe
2016-07-17 17:26   ` norm
2016-07-18  7:23     ` Johannes Schindelin
2016-07-18  9:19       ` [PATCH] pager: disable color when pager is "more" Eric Wong
2016-07-18 13:16         ` Jeff King
2016-07-18 17:19           ` Junio C Hamano [this message]
2016-07-18 18:58             ` Jeff King
2016-07-19  2:37             ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8twylv8y.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=norm@dad.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).