# HG changeset patch # User Matt Mackall # Date 1399660376 18000 # Node ID bcddddcf0b540b1d98f0dc1f1a1bef9337e2e567 # Parent 71028188970ebeb07aab9fa3f3901b0ba23dc4e1 pager: add attend- option This lets users override attend settings locally on a command granularity. diff -r 71028188970e -r bcddddcf0b54 hgext/pager.py --- a/hgext/pager.py Fri May 09 13:10:23 2014 -0500 +++ b/hgext/pager.py Fri May 09 13:32:56 2014 -0500 @@ -39,12 +39,20 @@ If pager.attend is present, pager.ignore will be ignored. +Lastly, you can enable and disable paging for individual commands with +the attend- option. This setting takes precedence over +existing attend and ignore options and defaults:: + + [pager] + attend-cat = false + To ignore global commands like :hg:`version` or :hg:`help`, you have to specify them in your user configuration file. The --pager=... option can also be used to control when the pager is used. Use a boolean value like yes, no, on, off, or use auto for normal behavior. + ''' import atexit, sys, os, signal, subprocess, errno, shlex @@ -132,6 +140,10 @@ cmds, _ = cmdutil.findcmd(cmd, commands.table) for cmd in cmds: + var = 'attend-%s' % cmd + if ui.config('pager', var): + usepager = ui.configbool('pager', var) + break if (cmd in attend or (cmd not in ignore and not attend)): usepager = True