Pager in core should be enabled by default

David Soria Parra dsp at experimentalworks.net
Mon Nov 30 20:54:17 CST 2015



On 11/30/15 2:47 PM, Augie Fackler wrote:
> On Mon, Nov 30, 2015 at 02:25:16PM -0800, Sean Farley wrote:
>>
>> Pierre-Yves David <pierre-yves.david at ens-lyon.org> writes:
>>
>>> On 11/25/2015 09:05 AM, Bryan O'Sullivan wrote:
>>>> On Tue, Nov 24, 2015 at 11:19 PM, Pierre-Yves David
>>>> <pierre-yves.david at ens-lyon.org <mailto:pierre-yves.david at ens-lyon.org>>
>>>> wrote:
>>>>
>>>>
>>>>     I'm definitely not fan of having pager on by default. I like my
>>>>     command line to be a series of commands with predictable behavior
>>>>     and backlog.
>>>>
>>>> So turn it off for yourself, that's what configuration is for – the
>>>> default should follow the most commonly useful case. You already know
>>>> perfectly well that everyone else at the major users of Mercurial has
>>>> the pager enabled, and that git has had the pager turned on by default
>>>> for years. This is a case of playing catch-up with the established norm.
>>>
>>> This is the question we are opening here, what should that default be.
>>> I'm happier without pager (and have been unconvinced by my testing), I
>>> know some other Mercurial users who are. I've not yet been convinced
>>> that unleashing unpredictable pager invocation to our basic users is the
>>> best course of action. (And that's why we are discussing it).
>>
>> I have to agree wholeheartedly with Bryan here. There are some bikesheds
>> with commandline arguments (--no-pager, --pager=something) and perhaps
>> with using a python version of paging, but those kind of things can be
>> discussed later.
> 
> So, I've been using pager for 10 minutes and it's already exhibited
> crazy behavior for me. My 'hg sl' alias (which is log under the
> covers) doesn't get paged. That's, uh, surprising.
> 
> Does anyone know how git handles this kind of situation?
> 

git aliases and pages based on the underlying  command, so an alias will
be paged (this is also true for shell'ed aliases such as !git log).

That aliases should page has come up a few times and I still think it's
a good idea. If I remember correctly the reason for the current behavior
was that the pager extension allows per-command opt in and that we think
of aliases as different commands (as they might have different output or
even do different things) or even complete bash snippets. Matt might
know more about it as we discussed it with him in the past. Maybe it's
an area that we can clean up if we enable it by default.

For me the topic looks like an application of the 80/20 rule, but that's
just my 2cent as I've lived with enabled pagering since I wrote pager.


More information about the Mercurial-devel mailing list