on master help sign in
Add a small tutorial
commit3456ce11874cf06b8cb6164437f2198e6ac7a4aa authorsharkdp <davidpeter@web.de> dateWed 26 Sep 2018, 18:08 (8 years ago) parent886a5b3
1 file changed+6−2
README.md+6−2
README.md+6−2
@@ -257,14 +257,18 @@ Finally, use `bat --list-themes` to check if the new themes are available.
257257`bat` uses the pager that is specified in the `PAGER` environment variable. If this variable is not
258258set, `less` is used by default. If you want to use a different pager, you can either modify the
259259`PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in
260−`PAGER`. If you want to pass command-line arguments to the pager, you need to create a small shell
261−script as a wrapper, for example:
260+`PAGER`.
261+
262+If you want to pass command-line arguments to the pager, you need to create a small shell
263+script as a wrapper, for example
262264
263265```bash
264266#!/bin/bash
265267
266268less --tabs 4 -R "$@"
267269```
270+(put this in a file `~/.bat-pager.sh`, make it executable `chmod +x ~/.bat-pager.sh` and use
271+`export BAT_PAGER="$HOME/.bat-pager.sh"` in your shells `rc` file)
268272
269273**Note**: By default, if the pager is set to `less`, `bat` will pass the following command line
270274options to the pager: `-R`/`--RAW-CONTROL-CHARS`, `-F`/`--quit-if-one-screen` and `-X`/`--no-init`.