##// END OF EJS Templates
pager: honour internal aliases...
David Soria Parra -
r19940:7d99bff0 stable
parent child Browse files
Show More
@@ -48,7 +48,7 b' normal behavior.'
48 48 '''
49 49
50 50 import atexit, sys, os, signal, subprocess, errno, shlex
51 from mercurial import commands, dispatch, util, extensions
51 from mercurial import commands, dispatch, util, extensions, cmdutil
52 52 from mercurial.i18n import _
53 53
54 54 testedwith = 'internal'
@@ -121,14 +121,20 b' def uisetup(ui):'
121 121 attend = ui.configlist('pager', 'attend', attended)
122 122 auto = options['pager'] == 'auto'
123 123 always = util.parsebool(options['pager'])
124 if (always or auto and
125 (cmd in attend or
126 (cmd not in ui.configlist('pager', 'ignore') and not attend))):
127 ui.setconfig('ui', 'formatted', ui.formatted())
128 ui.setconfig('ui', 'interactive', False)
129 if util.safehasattr(signal, "SIGPIPE"):
130 signal.signal(signal.SIGPIPE, signal.SIG_DFL)
131 _runpager(ui, p)
124
125 cmds, _ = cmdutil.findcmd(cmd, commands.table)
126
127 ignore = ui.configlist('pager', 'ignore')
128 for cmd in cmds:
129 if (always or auto and
130 (cmd in attend or
131 (cmd not in ignore and not attend))):
132 ui.setconfig('ui', 'formatted', ui.formatted())
133 ui.setconfig('ui', 'interactive', False)
134 if util.safehasattr(signal, "SIGPIPE"):
135 signal.signal(signal.SIGPIPE, signal.SIG_DFL)
136 _runpager(ui, p)
137 break
132 138 return orig(ui, options, cmd, cmdfunc)
133 139
134 140 extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
General Comments 0
You need to be logged in to leave comments. Login now