Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend PAGER support to all commands producing significant output #1630

Open
wants to merge 3 commits into
base: trunk
from

Conversation

@mislav
Copy link
Member

mislav commented Sep 7, 2020

The pr diff command had explicit support for defining a pager program through the PAGER environment variable. This tweaks that implementation to make it globally available to commands through the IOStreams object.

Example use: PAGER=less gh repo view cli/cli

Affected commands:

  • repo view
  • issue/pr view
  • issue/pr list
  • issue/pr status

Ref. #1100
Followup to #1290

TODO:

  • consider supporting gh config set pager ...?
  • extend pager support to gh api command?
mislav added 3 commits Sep 4, 2020
Extract the ad-hoc PAGER behavior from `pr diff` command and make it
available opt-in to any command through IOStreams.
@Nutza97
Nutza97 approved these changes Sep 7, 2020
@mislav mislav added this to Needs review 🤔 in The GitHub CLI Sep 9, 2020
Copy link
Member

vilmibm left a comment

awesome

The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Sep 10, 2020
@samcoe
samcoe approved these changes Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
The GitHub CLI
  
Needs to be merged 🎉
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.