[FEATURE] Follow the native terminal size in man #7
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/coreutils#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
The internal pager uses 24 logical lines unless the caller supplies --lines.
It should use the actual terminal height and adapt when that terminal resizes.
Proposed behavior and scope
When both standard streams are authenticated fixed terminal aliases, read the
existing PTY state through the original input endpoint. Use its current row
count for the viewport and refresh it before navigation can block or move.
Keep --lines as an explicit caller-selected override. Redirected and pipeline
output remains plain text and must not query terminal state or consume input.
Preserve position, search state and queued input when dimensions change. Reserve
space for the pager prompt and define behavior for a terminal with one row.
Authority, security and reliability
Use the existing receipt-free READ_STATE operation on the already selected input
SEND capability. Validate its exact live session/primary PTY and response framing,
correlation, lifecycle, dimensions and generation. A pathname, environment value
or terminal name must never select a new object or create a grant.
Do not consume the session's shared event cursor, request RESIZE/SET_MODE rights,
or acquire another lifecycle endpoint. Preserve original read/output errors,
lease retirement and buffer clearing on state failure or terminal hangup.
Acceptance criteria
Alternatives and tradeoffs
Environment variables and display-control queries cannot authenticate the terminal
object. Reusing the existing read-only state operation also avoids taking the
shared resize-event cursor away from another session consumer.
Tracking and rollout
Extends the native manual reader.
Coordinate Coreutils PR2,
Integration PR12 and the
phase completion checklist.
Physical-row paging is implemented in
f9eb4439: long lines reflow at the observed width, UTF-8 scalars occupy one native cell, resize retains the source position and backward search finds overlapping matches. Tiny screens use an explicit bounded fallback. The matching owner-driven resize route and guest fixture are being wired separately; man retains only its existing store READ and terminal READ_STATE access.