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

Re: [RFC] Clean way to disable pager

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Aug 19, 2007, 17:41 UTC
Message-ID
<vpqwsvr1kxz.fsf@bauges.imag.fr>
In-Reply-To
<vpq1wdz307k.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> What I can't find is a clean way to _disable_ the pager. A hacky way
> is to run "git whatever | cat", or "GIT_PAGER=cat git whatever". 
I juste realized that the second way is actually documented:
'GIT_PAGER'::
	This environment variable overrides `$PAGER`. If it is set
	to an empty string or to the value "cat", git will not launch
	a pager.

Still, I find this a bit too hidden in the documentation. I'd expect to find the way to disable the pager close to the place where I find the way to enable it. Perhaps something like this would do:

--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -101,7 +101,8 @@ OPTIONS
 	the current setting and then exit.
 
 -p|--paginate::
-	Pipe all output into 'less' (or if set, $PAGER).
+	Pipe all output into 'less' (or if set, $GIT_PAGER or $PAGER).
+	See the documentation of GIT_PAGER below to disable the pager.
 
 --git-dir=<path>::
 	Set the path to the repository. This can also be controlled by


Or perhaps move the sentence about "cat" from the documentation of
GIT_PAGER to the one of --paginate (neither place is really
appropriate, it's not specific to GIT_PAGER since setting $PAGER works
also, and not specific to --paginate since many commands enable it
automatically).
-- 
Matthieu
Previous: Matthieu MoyNext: Linus Torvalds
Message 2 of 15 in “[RFC] Clean way to disable pager”
  1. Matthieu MoyAug 19, 2007
  2. Matthieu MoyAug 19, 2007
  3. Linus TorvaldsAug 19, 2007
  4. Brian GernhardtAug 19, 2007
  5. Junio C HamanoAug 19, 2007
  6. Matthieu MoyAug 19, 2007
  7. Adam RobenAug 19, 2007
  8. David KastrupAug 19, 2007
  9. Matthieu MoyAug 20, 2007
  10. Jakub NarebskiAug 21, 2007
  11. Replace git --paginate by git --pager[=PAGER_CMD].Matthieu Moy, Aug 21, 2007
  12. Johannes SchindelinAug 21, 2007
  13. Matthieu MoyAug 21, 2007
  14. David KastrupAug 21, 2007
  15. Alex RiesenAug 19, 2007

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.