;doc: cli: paging: cleanup

This commit is contained in:
Simon Michael 2023-04-06 12:23:36 -10:00
parent f0157625cb
commit 2e58bea809

View File

@ -662,21 +662,19 @@ render prettier tables:
## Paging
When showing long output in the terminal, hledger will try to use
the pager specified by the `$PAGER` environment variable, otherwise `less`, otherwise `more`.
the pager specified by the `PAGER` environment variable, or `less`, or `more`.
(A pager is a helper program that shows one page at a time rather than scrolling everything off screen).
Currently it does this only for help output, not for reports; specifically,
- when listing commands, with `hledger`
- when showing help with `hledger [CMD] --help`,
- when viewing manuals with `hledger help` or `hledger* --man`.
- when viewing manuals with `hledger help` or `hledger --man`.
Note the pager is expected to handle ANSI codes, which hledger uses eg for bold emphasis.
For the common pager `less` (and its `more` compatibility mode),
we add `R` to `$LESS` and `$MORE` environment variables to make this work.
If you use a different pager, you might need to configure it yourself to avoid seeing junk on screen
(let us know so we can improve this).
Otherwise, you can set the `$NO_COLOR` environment variable to 1 to disable all ANSI output
(see [Colour](#colour)).
we add `R` to the `LESS` and `MORE` environment variables to make this work.
If you use a different pager, you might need to configure it similarly, to avoid seeing junk on screen (let us know).
Otherwise, you can set the `NO_COLOR` environment variable to 1 to disable all ANSI output (see [Colour](#colour)).
## Debug output