File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3434from bpython import translations ; translations .init ()
3535from bpython .translations import _
3636from bpython ._py3compat import py3
37+ from bpython .pager import get_pager_command
3738
3839from bpython .curtsiesfrontend import replpainter as paint
3940from bpython .curtsiesfrontend import sitefix ; sitefix .monkeypatch_quit ()
@@ -1350,7 +1351,7 @@ def focus_on_subprocess(self, args):
13501351 signal .signal (signal .SIGWINCH , prev_sigwinch_handler )
13511352
13521353 def pager (self , text ):
1353- command = os . environ . get ( 'PAGER' , 'less -rf' ). split ()
1354+ command = get_pager_command ()
13541355 with tempfile .NamedTemporaryFile () as tmp :
13551356 tmp .write (text )
13561357 tmp .flush ()
Original file line number Diff line number Diff line change 2727import pydoc
2828import subprocess
2929import sys
30+ import shlex
3031
31-
32- def get_pager_command ():
33- command = os .environ .get ('PAGER' , 'less -r' ).split ()
32+ def get_pager_command (default = 'less -r' ):
33+ command = shlex .split (os .environ .get ('PAGER' , default ))
3434 return command
3535
3636
You can’t perform that action at this time.
0 commit comments