All of lore.kernel.org
 help / color / mirror / Atom feed
* Proposal about --help options and man calls
@ 2007-07-18 21:50 David Kastrup
  2007-07-18 23:16 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: David Kastrup @ 2007-07-18 21:50 UTC (permalink / raw)
  To: git


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.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Proposal about --help options and man calls
  2007-07-18 21:50 Proposal about --help options and man calls David Kastrup
@ 2007-07-18 23:16 ` Junio C Hamano
  2007-07-18 23:28   ` David Kastrup
  2007-07-19  3:49   ` Brian Gernhardt
  0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2007-07-18 23:16 UTC (permalink / raw)
  To: David Kastrup; +Cc: git

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?

By the way, I would understand if there is a request to honor
GIT_LESS environment and if it exists export its value instead
of FRSX as LESS when we spawn the pager.  As some people do not
want S nor R for other programs but do want them for colored git
output that tends to consist of long lines.  This is a slightly
related topic, but different from the issue you raised in your
message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Proposal about --help options and man calls
  2007-07-18 23:16 ` Junio C Hamano
@ 2007-07-18 23:28   ` David Kastrup
  2007-07-19 10:42     ` Steven Grimm
  2007-07-19  3:49   ` Brian Gernhardt
  1 sibling, 1 reply; 5+ messages in thread
From: David Kastrup @ 2007-07-18 23:28 UTC (permalink / raw)
  To: git

Junio C Hamano <gitster@pobox.com> writes:

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Proposal about --help options and man calls
  2007-07-18 23:16 ` Junio C Hamano
  2007-07-18 23:28   ` David Kastrup
@ 2007-07-19  3:49   ` Brian Gernhardt
  1 sibling, 0 replies; 5+ messages in thread
From: Brian Gernhardt @ 2007-07-19  3:49 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: David Kastrup, git


On Jul 18, 2007, at 7:16 PM, Junio C Hamano wrote:

> What's the reason to set GIT_PAGER and PAGER differently to
> begin with?  Can people give examples of the reason why?

I currently have GIT_PAGER (actually, core.pager) set to tig.  Tig  
has lots of useful features for visualizing history and jumping  
between patches and logs.

But for everything that isn't git, less is far better.

~~ Brian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Proposal about --help options and man calls
  2007-07-18 23:28   ` David Kastrup
@ 2007-07-19 10:42     ` Steven Grimm
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Grimm @ 2007-07-19 10:42 UTC (permalink / raw)
  To: David Kastrup; +Cc: git

David Kastrup wrote:
> So I set GIT_PAGER to cat and hoped that it would get git to behave. 

FYI, you can also set GIT_PAGER to an empty value to completely disable 
paging. However, "cat" does the same thing -- it is special cased in 
pager.c to do the same thing as an empty value.

Hmm, I guess that could stand to be documented. Patch forthcoming.

-Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-19 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-18 21:50 Proposal about --help options and man calls David Kastrup
2007-07-18 23:16 ` Junio C Hamano
2007-07-18 23:28   ` David Kastrup
2007-07-19 10:42     ` Steven Grimm
2007-07-19  3:49   ` Brian Gernhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.