D4376: pager: do not enable when TERM=dumb

valentin.gatienbaron (Valentin Gatien-Baron) phabricator at mercurial-scm.org
Sun Aug 26 19:02:42 UTC 2018


valentin.gatienbaron created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Before this, running hg in emacs' M-x shell started `less`, which
  would complain about the terminal not being fully functional.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4376

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1052,6 +1052,7 @@
             command in self.configlist('pager', 'ignore')
             or not self.configbool('ui', 'paginate')
             or not self.configbool('pager', 'attend-' + command, True)
+            or encoding.environ.get('TERM') == 'dumb'
             # TODO: if we want to allow HGPLAINEXCEPT=pager,
             # formatted() will need some adjustment.
             or not self.formatted()



To: valentin.gatienbaron, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list