Show More
@@ -298,7 +298,7 b' def get_pager_cmd(pager_cmd=None):' | |||||
298 | Makes some attempts at finding an OS-correct one. |
|
298 | Makes some attempts at finding an OS-correct one. | |
299 | """ |
|
299 | """ | |
300 | if os.name == 'posix': |
|
300 | if os.name == 'posix': | |
301 |
default_pager_cmd = 'less - |
|
301 | default_pager_cmd = 'less -R' # -R for color control sequences | |
302 | elif os.name in ['nt','dos']: |
|
302 | elif os.name in ['nt','dos']: | |
303 | default_pager_cmd = 'type' |
|
303 | default_pager_cmd = 'type' | |
304 |
|
304 | |||
@@ -308,8 +308,8 b' def get_pager_cmd(pager_cmd=None):' | |||||
308 | except: |
|
308 | except: | |
309 | pager_cmd = default_pager_cmd |
|
309 | pager_cmd = default_pager_cmd | |
310 |
|
310 | |||
311 | if pager_cmd == 'less' and '-r' not in os.environ.get('LESS', ''): |
|
311 | if pager_cmd == 'less' and '-r' not in os.environ.get('LESS', '').lower(): | |
312 |
pager_cmd += ' - |
|
312 | pager_cmd += ' -R' | |
313 |
|
313 | |||
314 | return pager_cmd |
|
314 | return pager_cmd | |
315 |
|
315 |
General Comments 0
You need to be logged in to leave comments.
Login now