From 422d42ee9639107fdc11ec9f5864ae63e1858b5f 2016-04-20 19:03:32 From: Pierre Gerold Date: 2016-04-20 19:03:32 Subject: [PATCH] Thomas fix --- diff --git a/IPython/core/page.py b/IPython/core/page.py index 3f0312f..b0f4a7f 100644 --- a/IPython/core/page.py +++ b/IPython/core/page.py @@ -298,7 +298,7 @@ def get_pager_cmd(pager_cmd=None): Makes some attempts at finding an OS-correct one. """ if os.name == 'posix': - default_pager_cmd = 'less -R' # -r for color control sequences + default_pager_cmd = 'less -R' # -R for color control sequences elif os.name in ['nt','dos']: default_pager_cmd = 'type' @@ -308,7 +308,7 @@ def get_pager_cmd(pager_cmd=None): except: pager_cmd = default_pager_cmd - if pager_cmd == 'less' and not os.environ.get('LESS', ''): + if pager_cmd == 'less' and '-r' not in os.environ.get('LESS', ''): pager_cmd += ' -R' return pager_cmd