Skip to content

Extend PAGER support to all commands producing significant output - #1630

Merged
mislav merged 11 commits into
trunkfrom
pager-for-everyone
Sep 16, 2020
Merged

mislav merged 11 commits into
trunkfrom
pager-for-everyone

Conversation

@mislav

@mislav mislav commented Sep 7, 2020 •

Copy link
Copy Markdown
Contributor

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?
  • document PAGER environment variable

Extract the ad-hoc PAGER behavior from `pr diff` command and make it
available opt-in to any command through IOStreams.

@vilmibm vilmibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants