# HG changeset patch # User Matt Mackall # Date 2014-05-09 18:05:52 # Node ID e1f5f38fd944aa1eab8ee23f87698477da9e60ff # Parent 2bc778e2f9b338ab776e1a5fb30c547b8468ba61 pager: break always out of command check loop diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -117,19 +117,20 @@ def uisetup(ui): def pagecmd(orig, ui, options, cmd, cmdfunc): p = ui.config("pager", "pager", os.environ.get("PAGER")) usepager = False + always = util.parsebool(options['pager']) if not p: pass + elif always: + usepager = True else: attend = ui.configlist('pager', 'attend', attended) auto = options['pager'] == 'auto' - always = util.parsebool(options['pager']) - cmds, _ = cmdutil.findcmd(cmd, commands.table) ignore = ui.configlist('pager', 'ignore') for cmd in cmds: - if (always or auto and + if (auto and (cmd in attend or (cmd not in ignore and not attend))): usepager = True