gh-148321: use --quit-if-one-screen option for the pager (new REPL)#148322
gh-148321: use --quit-if-one-screen option for the pager (new REPL)#148322skirpichev wants to merge 2 commits intopython:mainfrom
Conversation
…EPL) Currently, by passing --clear-screen (-c) to the pager --- small texts (like few-sentences docstrings) are shown at top of the screen, just as big texts. I believe it would be better to show this inline instead, not clearing last session commands with output and so on. BTW, this is the default for git commands, e.g. git-log. Of course, we loose on this way ability to use pager for search, but terminal emulators usually have similar capability on its own.
|
Like #146382, this might be viewed as a cosmetic change. Though, it's user-visible. So, let me know if I should add news. |
Not exactly, before |
Co-authored-by: Stan Ulbrych <stan@python.org>
No. If your input at the bottom of the screen (which is usual for a long session) - the screen will not be cleared. For this reason, I doubt this worth a backports. But technically, we can do backports for 3.13/14. |
I still don't quite get how to reproduce that? I tried at the bottom of the screen, Screencast.From.2026-04-10.09-36-19.mp4But no luck? |
|
@StanFromIreland, indeed. I would guess it's related to our local settings. In my case: The current patch does work for you as expected (ie. not clear screen)? If so, then it does make sense to backport it. |
Currently, by passing --clear-screen (-c) to the pager --- small texts (like few-sentences docstrings) are shown at top of the screen, just as big texts.
I believe it would be better to show this inline instead, not clearing last session commands with output and so on. BTW, this is the default for git commands, e.g. git-log. Of course, we loose on this way ability to use pager for search, but terminal emulators usually have similar capability on its own.