Re: [RFC] Clean way to disable pager
From: Matthieu Moy <hidden>
Date: 2016-06-15 22:43:29
Matthieu Moy [off-list ref] 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