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
gh api
not using $PAGER
correctly
#9017
Comments
Uh oh! Any chance you could capture this in a screen recording to help me better understand what you're seeing! It would be very interesting to know if this reproduced in |
Here are two asciinema recordings; the first one involves more than a screenful of output, while the second involves less than a screenful. In both cases, all I did inside
I downloaded the macOS amd64 release assets for each of those versions from the Releases page, and none of them exhibited the bug. Just to be sure this wasn't Homebrew's fault, I also downloaded the 2.48.0 asset from the Releases page, and it still has the buggy behavior.
Every time I've used |
@williammartin I'm currently debugging this and trying both v2.47.0 and v2.48.0 to see what's causing this. So far, everything is the same between the two (for this specific scenario where the newly introduced |
@williammartin I just submitted #9020 to fix this. The change that caused this in v2.48.0, was the calling of And sorry because it's not yet marked as |
OS: macOS Sonoma 14.4.1
gh version: 2.48.0 (installed via Homebrew)
I have the environment variables
PAGER=/usr/bin/less
andLESS=-iRS
(but notGH_PAGER
) set in my shell. Starting sometime maybe in the last month, whenever I rungh api
without any output redirection, the program will startless
to show the output, but the screen will show the last lines of the output rather than the start of the output, and if I then press any key, the output disappears, to be replaced by a tilde on each line (which is howless
displays empty input). I think this problem is caused by mixing up stdout and stderr, but I'm unable to come up with an MVCE.If I unset
PAGER
,gh api
will output to stdout correctly. If I unsetLESS
instead,gh api
still outputs to stdout without invokingless
.The text was updated successfully, but these errors were encountered: