-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
feat: use a pager for all large terminal output, not just for help #2268
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simonmichael
added
A-WISH
Some kind of improvement request, hare-brained proposal, or plea.
platform:linux
platform:mac
platform:nix
platform:freebsd
platform:docker
and removed
platform:nix
platform:docker
labels
Oct 18, 2024
simonmichael
force-pushed
the
pager-for-all
branch
from
October 18, 2024 05:55
2d80239
to
40d57e3
Compare
simonmichael
force-pushed
the
pager-for-all
branch
from
October 18, 2024 06:51
f7e0667
to
85e528c
Compare
simonmichael
force-pushed
the
pager-for-all
branch
from
October 18, 2024 07:22
85e528c
to
465a35a
Compare
simonmichael
force-pushed
the
pager-for-all
branch
from
October 18, 2024 09:56
05d78d6
to
00ced42
Compare
--color now also works in a config file, like --pager, except for two cases: it does not affect colouring of debug output, or the colouring helpers used in the check recentassertions error message.
simonmichael
force-pushed
the
pager-for-all
branch
from
October 18, 2024 17:49
00ced42
to
6978be5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-WISH
Some kind of improvement request, hare-brained proposal, or plea.
impact5
Affects most or all users.
platform:freebsd
platform:linux
platform:mac
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an impactful change, and I value the CLI and easy scriptability. But it has been working well for help output, and I for one am ready for it. Feedback, testing and problem reports welcome.
Doc:
Paging
On unix-like systems, when displaying large output in the terminal,
hledger tries to use a pager when appropriate:
the one specified by the
PAGER
environment variable,otherwise
less
if available, otherwisemore
if available.The pager shows one page of text at a time, and lets you scroll around to see more.
While it is active, usually
SPACE
shows the next page,q
quits, and?
shows more features.The pager is expected to display ANSI color and text styling if possible.
hledger adds
R
to theLESS
andMORE
environment variables to enable thisin
less
(and in itsmore
compatibility mode).If you use a different pager, you might need to configure it similarly, to avoid seeing junk on screen.
Or you can set the
NO_COLOR
environment variable described below.