feat(display): route long output through $PAGER - #203
Merged
Conversation
ruby-automation
force-pushed
the
ext-23-pager-support
branch
from
September 3, 2026 15:50
6e5dea9 to
688175b
Compare
ruby-automation
enabled auto-merge (squash)
September 3, 2026 15:50
ruby-automation
force-pushed
the
ext-23-pager-support
branch
from
September 3, 2026 15:54
688175b to
841594f
Compare
Add LinearCli.CLI.Pager module that pipes text output through the user's configured pager (default: less -FRX) when stdout is a terminal and the content exceeds the terminal height. Refactor Display.show/2 to collect all text first, then delegate to Pager.maybe_page/2. Paging is skipped for JSON output, non-TTY environments, PAGER="" or PAGER=cat, and content that fits on screen. Falls back to IO.puts when the pager exits with a non-zero status. Closes EXT-23 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ruby-automation
force-pushed
the
ext-23-pager-support
branch
from
September 3, 2026 15:59
841594f to
b6bb23b
Compare
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LinearCli.CLI.Pagermodule withmaybe_page/2that routes text through$PAGER(default:less -FRX) when stdout is a terminal and content exceeds terminal heightDisplay.show/2text path to collect all output into a single string, then delegate toPager.maybe_page/2instead of callingIO.putsper itemPAGER="",PAGER=cat, and content that fits on screenIO.putswhen pager exits with non-zero status (e.g. pager not found)Test plan
less -FRX, custom$PAGER, temp-file content, temp-file cleanup, cleanup on crash, non-zero exit fallbackmix credocleanmix format --check-formattedcleanCloses EXT-23
🤖 Generated with Claude Code