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