Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 39340:6f38284b23f4
pager: do not enable when TERM=dumb
Before this, running hg in emacs' M-x shell started `less`, which
would complain about the terminal not being fully functional.
Differential Revision: https://phab.mercurial-scm.org/D4376
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Sun, 26 Aug 2018 13:09:35 -0400 |
parents | e9740c07158d |
children | 50f46b771921 |
comparison
equal
deleted
inserted
replaced
39339:9198e41df6ef | 39340:6f38284b23f4 |
---|---|
1050 # explicit --pager=on (= 'internal-always-' prefix) should | 1050 # explicit --pager=on (= 'internal-always-' prefix) should |
1051 # take precedence over disabling factors below | 1051 # take precedence over disabling factors below |
1052 command in self.configlist('pager', 'ignore') | 1052 command in self.configlist('pager', 'ignore') |
1053 or not self.configbool('ui', 'paginate') | 1053 or not self.configbool('ui', 'paginate') |
1054 or not self.configbool('pager', 'attend-' + command, True) | 1054 or not self.configbool('pager', 'attend-' + command, True) |
1055 or encoding.environ.get('TERM') == 'dumb' | |
1055 # TODO: if we want to allow HGPLAINEXCEPT=pager, | 1056 # TODO: if we want to allow HGPLAINEXCEPT=pager, |
1056 # formatted() will need some adjustment. | 1057 # formatted() will need some adjustment. |
1057 or not self.formatted() | 1058 or not self.formatted() |
1058 or self.plain() | 1059 or self.plain() |
1059 or self._buffers | 1060 or self._buffers |