]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
`_pyrepl/pager.py`: call `less` with `--clear-screen` (#146382)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Sat, 28 Mar 2026 17:23:58 +0000 (18:23 +0100)
committerGitHub <noreply@github.com>
Sat, 28 Mar 2026 17:23:58 +0000 (17:23 +0000)
Lib/_pyrepl/pager.py

index 1fddc63e3ee3ad0c73a62ca31a5ea1cd3631266d..92afaa5933a22509883ec49214ee57f2e49d211c 100644 (file)
@@ -138,7 +138,7 @@ def pipe_pager(text: str, cmd: str, title: str = '') -> None:
         '.'
         '?e (END):?pB %pB\\%..'
         ' (press h for help or q to quit)')
-    env['LESS'] = '-RmPm{0}$PM{0}$'.format(prompt_string)
+    env['LESS'] = '-RcmPm{0}$PM{0}$'.format(prompt_string)
     proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
                             errors='backslashreplace', env=env)
     assert proc.stdin is not None