Don't call pager with --clear-screen
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
This was recently introduced by https://github.com/python/cpython/pull/146382.
I believe this rather lead to a bad user experience, see https://github.com/python/cpython/pull/146382#issuecomment-4185931124. The screen will be cleared regardless on the text size, even if it's small, like small docstrings. Then you have to scroll up terminal to see recent output and so on.
IMO, it's better to follow git's defaults, which uses --quit-if-one-screen option to display small texts "inline". We could too.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
- gh-148322
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing linked PR gh-148322 and the changes introduced by PR 146382, then trace where CPython invokes the pager for small docstrings. Done means small text stays inline while longer output still uses the pager without clearing the terminal; add or update the relevant tests if that work is not already covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100