mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-01 10:29:20 +01:00
Update README steps for using bat as MANPAGER
This commit is contained in:
parent
fd1e0d5876
commit
81d4edd7fd
12
README.md
12
README.md
@ -204,19 +204,19 @@ bat main.cpp | xclip
|
|||||||
`MANPAGER` environment variable:
|
`MANPAGER` environment variable:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
|
||||||
man 2 select
|
man 2 select
|
||||||
```
|
```
|
||||||
(replace `bat` with `batcat` if you are on Debian or Ubuntu)
|
(replace `bat` with `batcat` if you are on Debian or Ubuntu)
|
||||||
|
|
||||||
It might also be necessary to set `MANROFFOPT="-c"` if you experience
|
|
||||||
formatting problems.
|
|
||||||
|
|
||||||
If you prefer to have this bundled in a new command, you can also use [`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md).
|
If you prefer to have this bundled in a new command, you can also use [`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md).
|
||||||
|
|
||||||
Note that the [Manpage syntax](assets/syntaxes/02_Extra/Manpage.sublime-syntax) is developed in this repository and still needs some work.
|
> [!WARNING]
|
||||||
|
> This will [not work](https://github.com/sharkdp/bat/issues/1145) out of the box with Mandoc's `man` implementation.
|
||||||
|
>
|
||||||
|
> Please either use `batman`, or convert the shell script to a [shebang executable](https://en.wikipedia.org/wiki/Shebang_(Unix)) and point `MANPAGER` to that.
|
||||||
|
|
||||||
Also, note that this will [not work](https://github.com/sharkdp/bat/issues/1145) with Mandocs `man` implementation.
|
Note that the [Manpage syntax](assets/syntaxes/02_Extra/Manpage.sublime-syntax) is developed in this repository and still needs some work.
|
||||||
|
|
||||||
#### `prettier` / `shfmt` / `rustfmt`
|
#### `prettier` / `shfmt` / `rustfmt`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user