Add environment variable BAT_PAGING

This commit is contained in:
einfachIrgendwer0815 2023-08-05 21:18:38 +02:00 committed by Martin Nordholts
parent f21d3502e1
commit 26111950b3
5 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,8 @@
## Features
- Add environment variable `BAT_PAGING`, see #2629 (@einfachIrgendwer0815)
## Bugfixes
- Fix `more` not being found on Windows when provided via `BAT_PAGER`, see #2570, #2580, and #2651 (@mataha)

View File

@ -89,8 +89,8 @@ Options:
--paging <when>
Specify when to use the pager. To disable the pager, use --paging=never' or its
alias,'-P'. To disable the pager permanently, set BAT_PAGER to an empty string. To control
which pager is used, see the '--pager' option. Possible values: *auto*, never, always.
alias,'-P'. To disable the pager permanently, set BAT_PAGING to 'never'. To control which
pager is used, see the '--pager' option. Possible values: *auto*, never, always.
--pager <command>
Determine which pager is used. This option will override the PAGER and BAT_PAGER

View File

@ -311,7 +311,7 @@ pub fn build_app(interactive_output: bool) -> Command {
.long_help(
"Specify when to use the pager. To disable the pager, use \
--paging=never' or its alias,'-P'. To disable the pager permanently, \
set BAT_PAGER to an empty string. To control which pager is used, see the \
set BAT_PAGING to 'never'. To control which pager is used, see the \
'--pager' option. Possible values: *auto*, never, always."
),
)

View File

@ -142,6 +142,7 @@ pub fn get_args_from_env_vars() -> Vec<OsString> {
("--tabs", "BAT_TABS"),
("--theme", "BAT_THEME"),
("--pager", "BAT_PAGER"),
("--paging", "BAT_PAGING"),
("--style", "BAT_STYLE"),
]
.iter()

View File

@ -255,6 +255,7 @@ fn invoke_bugreport(app: &App, cache_dir: &Path) {
"LANG",
"LC_ALL",
"BAT_PAGER",
"BAT_PAGING",
"BAT_CACHE_PATH",
"BAT_CONFIG_PATH",
"BAT_OPTS",