Skip to content

How can I keep gh pr list output in terminal? #3685

Answered by mislav
kluka-CS asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, the keypress Q is implemented by your PAGER program, not by gh. Check your $PAGER environment variable or the gh config get pager setting. I'm guessing that your pager is less.

How less behaves is dictated by the $LESS environment variable, if one exists. I'm guessing yours is set to LESS=FR somewhere in your shell configuration files. To avoid clearing your screen when you exit, you want to add "X" to the list of flags to less. You can do that by setting LESS=FRX (the default value we use if $LESS isn't set), or by doing gh config set pager 'less -X'.

Finally, you might not want to use a pager program at all for any gh output. To disable pager, do gh config set pager cat. The output …

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@kluka-CS
Comment options

@igorlvicente
Comment options

@mislav
Comment options

@igorlvicente
Comment options

Answer selected by kluka-CS
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants