1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-10-23 20:23:58 +01:00

docs: Clarify that -X/--no-init is not added on modern versions of less

This commit is contained in:
Justin Su
2025-10-19 15:58:21 -04:00
committed by Martin Nordholts
parent 4bd5cbca8e
commit 7e55608975

View File

@@ -679,8 +679,8 @@ have to press `q` to quit the pager.
The `-K`/`--quit-on-intr` option instructs `less` to exit immediately when an interrupt signal is received. The `-K`/`--quit-on-intr` option instructs `less` to exit immediately when an interrupt signal is received.
This is useful to ensure that `less` quits together with `bat` on SIGINT. This is useful to ensure that `less` quits together with `bat` on SIGINT.
The `-X`/`--no-init` option is needed to fix a bug with the `-F`/`--quit-if-one-screen` feature in versions The `-X`/`--no-init` option is added to versions of `less` older than version 530 (older than 558 on Windows) to
of `less` older than version 530. Unfortunately, it also breaks mouse-wheel support in `less`. fix a bug with the `-F`/`--quit-if-one-screen` feature. Unfortunately, it also breaks mouse-wheel support in `less`.
If you want to enable mouse-wheel scrolling on older versions of `less` and do not mind losing If you want to enable mouse-wheel scrolling on older versions of `less` and do not mind losing
the quit-if-one-screen feature, you can set the pager (via `--pager` or `BAT_PAGER`) to `less -R`. the quit-if-one-screen feature, you can set the pager (via `--pager` or `BAT_PAGER`) to `less -R`.
For `less` 530 or newer, it should work out of the box. For `less` 530 or newer, it should work out of the box.