Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] pager: do not fork a pager if environment variable PAGER is set to NONE
Date: Sat, 15 Apr 2006 19:20:47 -0700	[thread overview]
Message-ID: <7v4q0udzwg.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0604160357460.31461@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Sun, 16 Apr 2006 04:01:30 +0200 (CEST)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Hi,
>
> On Sat, 15 Apr 2006, Junio C Hamano wrote:
>
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> 
>> > This helps debugging tremendously.
>> >
>> > Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
>> 
>> I like what this wants to do.  I am not so sure PAGER=NONE is a
>> good convention, however.
>
> I am sure it is not.
>
> One solution would be to introduce yet another command line option 
> "--no-pager", but I find that ugly.
>
> Another solution would be to check if the environment variable NO_PAGER is 
> set.
>
> Wishes?

Honestly, undecided.  Not that I think people would do
PAGER=NONE to mean a program /usr/bin/NONE.

Right now, the following does not say anything:

	$ PAGER= git log

but I do not think that is a reasonably behaviour, either.  So
detecting PAGER is set to an empty string (not "nonexistence" -
the current behaviour of defaulting to "less" in such a case is
reasonable) is probably a better alternative.

A somewhat related topic; I often set PAGER=cat when I do not
want the --[More]-- prompt and I thing many Emacs users do this.
It might also be good to detect it and omit piping in such a
case, but that is independent, so if you are going to do this as
well, please make it a separate patch.

  reply	other threads:[~2006-04-16  2:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-15 13:16 [RFC/PATCH] pager: do not fork a pager if environment variable PAGER is set to NONE Johannes Schindelin
2006-04-15 20:50 ` Junio C Hamano
2006-04-16  2:01   ` Johannes Schindelin
2006-04-16  2:20     ` Junio C Hamano [this message]
2006-04-16  2:44       ` Johannes Schindelin

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

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

  git send-email \
    --in-reply-to=7v4q0udzwg.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox