on master help sign in
Update README
6568d03sharkdp
README.md+9−8
@@ -435,18 +435,19 @@ export BAT_PAGER="less -RF"
435Instead of using environment variables, you can also use `bat`s [configuration file](https://github.com/sharkdp/bat#configuration-file) to configure the pager (`--pager` option).
435Instead of using environment variables, you can also use `bat`s [configuration file](https://github.com/sharkdp/bat#configuration-file) to configure the pager (`--pager` option).
436
436
437**Note**: By default, if the pager is set to `less` (and no command-line options are specified),
437**Note**: By default, if the pager is set to `less` (and no command-line options are specified),
438−`bat` will pass the following command line
438+`bat` will pass the following command line options to the pager: `-R`/`--RAW-CONTROL-CHARS`,
439−options to the pager: `-R`/`--RAW-CONTROL-CHARS`, `-F`/`--quit-if-one-screen` and `-X`/`--no-init`.
439+`-F`/`--quit-if-one-screen` and `-X`/`--no-init`. The last option (`-X`) is only used for `less`
440+versions older than 530.
441+
440−The first (`-R`) is needed to interpret ANSI colors correctly. The second option (`-F`) instructs
442+The `-R` option is needed to interpret ANSI colors correctly. The second option (`-F`) instructs
441less to exit immediately if the output size is smaller than the vertical size of the terminal.
443less to exit immediately if the output size is smaller than the vertical size of the terminal.
442This is convenient for small files because you do not have to press `q` to quit the pager. The
444This is convenient for small files because you do not have to press `q` to quit the pager. The
443third option (`-X`) is needed to fix a bug with the `--quit-if-one-screen` feature in old versions
445third option (`-X`) is needed to fix a bug with the `--quit-if-one-screen` feature in old versions
444−of `less`. Unfortunately, it also breaks mouse-wheel support in `less`. If you want to enable
446+of `less`. Unfortunately, it also breaks mouse-wheel support in `less`.
445−mouse-wheel scrolling, you can either pass just `-R` (as in the example above, this will disable
446−the quit-if-one-screen feature), or you can use a recent version of `less` and pass `-RF` which
447−will hopefully enable both quit-if-one-screen and mouse-wheel scrolling.
448
447
449−If scrolling still doesn't work for you, you can try to pass the `-S` option in addition.
448+If you want to enable mouse-wheel scrolling on older versions of `less`, you can pass just `-R` (as
449+in the example above, this will disable the quit-if-one-screen feature). For less 530 or newer,
450+it should work out of the box.
450
451
451### Dark mode
452### Dark mode
452
453