pager: add attend-<command> option
This lets users override attend settings locally on a command
granularity.
--- 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-<command> 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