Skip to content

gh pr diff: add pager #1290

Closed
Closed

Description

@casperdcl

Describe the feature or problem you’d like to solve

gh pr diff does not work like git diff - specifically, it does not have a pager.

doing gh pr diff | less also removes colours so is not a solution.

Proposed solution

make gh pr diff behave like git diff, i.e. colourful pagination

Activity

  1. added
    enhancement
    on Jun 29, 2020
  2. mislav commented on Aug 21, 2020

    @mislav
    Contributor

    This is now available: #1534

    $ PAGER="less -R" gh pr diff 123
    
  3. Atcold commented on Jul 2, 2021

    @Atcold

    How about making the PAGER thing the default behaviour?

  4. nik-kashi commented on May 11, 2023

    @nik-kashi

    How about making the PAGER thing the default behaviour?

    You can add this as an environment variable:

    export PAGER="less -R"
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions