[PATCH 2 of 2 pager-endgame] pager: add a config knob to just globally turn off the pager
Augie Fackler
raf at durin42.com
Wed Mar 8 23:26:39 UTC 2017
> On Feb 22, 2017, at 09:33, Yuya Nishihara <yuya at tcha.org> wrote:
>
> On Tue, 21 Feb 2017 16:18:13 -0500, Augie Fackler wrote:
>> # HG changeset patch
>> # User Augie Fackler <augie at google.com>
>> # Date 1486505605 18000
>> # Tue Feb 07 17:13:25 2017 -0500
>> # Node ID 390e26db66994cc2f627933815db02353958289f
>> # Parent 589dcabe2b7a2b9f2d49646d710335e5a70ad492
>> pager: add a config knob to just globally turn off the pager
>>
>> diff --git a/mercurial/help/pager.txt b/mercurial/help/pager.txt
>> --- a/mercurial/help/pager.txt
>> +++ b/mercurial/help/pager.txt
>> @@ -26,3 +26,10 @@ you can use --pager=<value>::
>> - require the pager: `yes` or `on`.
>> - suppress the pager: `no` or `off` (any unrecognized value
>> will also work).
>> +
>> +To globally turn off all attempts to use a pager, set::
>> +
>> + [pager]
>> + enable = false
>> +
>> +which will prevent the pager from running.
>> diff --git a/mercurial/ui.py b/mercurial/ui.py
>> --- a/mercurial/ui.py
>> +++ b/mercurial/ui.py
>> @@ -857,6 +857,7 @@ class ui(object):
>> if (self._disablepager
>> or self.pageractive
>> or command in self.configlist('pager', 'ignore')
>> + or not self.configbool('pager', 'enable', True)
>
> Perhaps disablepager() could be merged with this?
I suppose it could, although I kind of like the explicitness of --pager=never overriding some well-intentioned extension that tries to turn the pager on for you.
I don't feel strongly either way though.
More information about the Mercurial-devel
mailing list