Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/_pyrepl/pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_pager() -> Pager:
return lambda text, title='': tempfile_pager(plain(text), 'more <')
if hasattr(os, 'system') and os.system('(pager) 2>/dev/null') == 0:
return lambda text, title='': pipe_pager(text, 'pager', title)
if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:
if hasattr(os, 'system') and os.system('(less -V) >/dev/null 2>&1') == 0:
return lambda text, title='': pipe_pager(text, 'less', title)

import tempfile
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the :mod:`pydoc` pager not detecting ``less`` 706 and newer.
Loading