hgext/pager.py
changeset 9841 7cd6dee6fe37
parent 9267 bd9e5d200186
child 10112 703db37d186b
--- a/hgext/pager.py	Thu Nov 12 12:46:00 2009 +0100
+++ b/hgext/pager.py	Thu Nov 12 10:29:40 2009 -0500
@@ -35,10 +35,13 @@
   ignore = version, help, update
 
 You can also enable the pager only for certain commands using
-pager.attend::
+pager.attend. Below is the default list of commands to be paged::
 
   [pager]
-  attend = log
+  attend = annotate, cat, diff, export, glog, log, qdiff
+
+Setting pager.attend to an empty value will cause all commands to be
+paged.
 
 If pager.attend is present, pager.ignore will be ignored.
 
@@ -53,7 +56,7 @@
     def pagecmd(orig, ui, options, cmd, cmdfunc):
         p = ui.config("pager", "pager", os.environ.get("PAGER"))
         if p and sys.stdout.isatty() and '--debugger' not in sys.argv:
-            attend = ui.configlist('pager', 'attend')
+            attend = ui.configlist('pager', 'attend', attended)
             if (cmd in attend or
                 (cmd not in ui.configlist('pager', 'ignore') and not attend)):
                 sys.stderr = sys.stdout = util.popen(p, "wb")
@@ -62,3 +65,5 @@
         return orig(ui, options, cmd, cmdfunc)
 
     extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
+
+attended = ['annotate', 'cat', 'diff', 'export', 'glog', 'log', 'qdiff']