Re: Proposal about --help options and man calls
- From
David Kastrup <dak@gnu.org>
- Date
- Jul 18, 2007, 23:28 UTC
- Message-ID
- <85ejj5wats.fsf@lola.goethe.zz>
- In-Reply-To
- <7v644h715y.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> David Kastrup <dak@gnu.org> writes: > >> Frequently, git somecommand --help will call the man command to >> display help pages. I think that when it does so, it should pass the >> value of the GIT_PAGER variable copied into the PAGER variable: the >> paging happens on behalf of git here. > > Hmph. Is that to help people who uses GIT_PAGER but no PAGER, > or have both but set it differently (setting both and in the > same way does not make much sense). But what it means is that > "git command --help" and "man git-command" would be paged > differently. I highly doubt it is really desirable. > > What's the reason to set GIT_PAGER and PAGER differently to begin > with? Can people give examples of the reason why?
If I call command --help, I don't want a pager barfing at me. Never. I have scrollback for that. It is my choice when I page and when I page not. There are manual pages who go through 50 pages or so, however. There are commands that fundamentally are connected with a pager. man is, for example. But most cases where git calls a pager (and that includes his way of calling man without getting asked for it explicitly) utterly surprise me. So I set GIT_PAGER to cat and hoped that it would get git to behave. Sometimes it does, sometimes it doesn't.
-- David Kastrup, Kriemhildstr. 15, 44793 Bochum