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

Re: [RFC/PATCH] pager: do not fork a pager if environment variable PAGER is set to NONE

From
Junio C Hamano <junkio@cox.net>
Date
Apr 16, 2006, 02:20 UTC
Message-ID
<7v4q0udzwg.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0604160357460.31461@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 22 quoted lines
> 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.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 5 in “pager: do not fork a pager if environment variable PAGER is set to NONE”
  1. pager: do not fork a pager if environment variable PAGER is set to NONEJohannes Schindelin, Apr 15, 2006
  2. Junio C HamanoApr 15, 2006
  3. Johannes SchindelinApr 16, 2006
  4. Junio C HamanoApr 16, 2006
  5. Johannes SchindelinApr 16, 2006

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.