[RFC PATCH 06/13] b4: select platform-appropriate default pager
Adrian Neftali Sanchez <[email protected]>
| Newsgroups | org.kernel.linux.tools |
|---|---|
| Message-ID | <[email protected]> |
"less" is not available on a stock Windows installation. Fall back to "more" when sys.platform is "win32" and no explicit pager is configured via GIT_PAGER, core.pager, or the PAGER environment variable. Signed-off-by: Adrian Neftali Sanchez <[email protected]> --- src/b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/b4/__init__.py b/src/b4/__init__.py index 262668f..803d487 100644 --- a/src/b4/__init__.py +++ b/src/b4/__init__.py @@ -5685,7 +5685,7 @@ def view_in_pager(bdata: bytes, filehint: str = 'b4-view.txt') -> None: os.environ.get('GIT_PAGER') or corecfg.get('pager') or os.environ.get('PAGER') - or 'less' + or ('more' if sys.platform == 'win32' else 'less') ) logger.debug('pager=%s', pager) -- 2.45.0.windows.1