Skip to content

Commit 4ecdd88

Browse files
don't hardcode pager
1 parent 7018553 commit 4ecdd88

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,10 +993,11 @@ def focus_on_subprocess(self, args):
993993
signal.signal(signal.SIGWINCH, prev_sigwinch_handler)
994994

995995
def pager(self, text):
996+
command = os.environ.get('PAGER', 'less -r').split()
996997
with tempfile.NamedTemporaryFile() as tmp:
997998
tmp.write(text)
998999
tmp.flush()
999-
self.focus_on_subprocess(['less', '-R', tmp.name])
1000+
self.focus_on_subprocess(command + [tmp.name])
10001001

10011002
def help_text(self):
10021003
NOT_IMPLEMENTED = ['suspend', 'cut to buffer', 'search', 'last output', 'yank from buffer', 'cut to buffer']

0 commit comments

Comments
 (0)