-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
I have PAGER set in my environment to tell various tools my preferred pager. Every tool I use that understands this variable, except gh, understands that output smaller than a single terminal window doesn't need to go through the pager. With gh, it seems the only options are to run everything through a pager, or nothing. Including empty output!
This is annoying and frustrating.
gh version 2.17.0 (2022-10-04)
Steps to reproduce the behavior
- Create or find a repo with zero open PRs
- Clone this repo
export PAGER=less- Within the clone, run
gh pr list - Laugh/cry at
lessbeing opened to displaybyte 0/0 (END) - Note also that
ghdid produce some output ... that it didn't send to the pager, but which is hidden due to the presence of the pager, until you quit it:no open pull requests in owner/reponame export GH_PAGER=to make this stop- Cry that now no pager is used even for voluminous output 😢
Expected vs actual behavior
I expect gh to use the configure pager only when there is enough output to merit pagination, like every other tool that supports such config. Compare especially git
Logs
N/A
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic