mirror of
https://github.com/sharkdp/bat.git
synced 2026-02-08 00:32:08 +00:00
Simplify MANPAGER guide
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
## Bugfixes
|
|
||||||
|
|
||||||
- Strip overstriking before applying syntax highlighting to better support man pages, see #3517 (@akirk)
|
- Strip overstriking before applying syntax highlighting to better support man pages, see #3517 (@akirk)
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
- `--help` now correctly honors `--pager=builtin`. See #3516 (@keith-hall)
|
- `--help` now correctly honors `--pager=builtin`. See #3516 (@keith-hall)
|
||||||
- `--help` now correctly honors custom themes. See #3524 (@keith-hall)
|
- `--help` now correctly honors custom themes. See #3524 (@keith-hall)
|
||||||
|
|
||||||
|
|||||||
@@ -195,18 +195,13 @@ bat main.cpp | xclip
|
|||||||
`MANPAGER` environment variable:
|
`MANPAGER` environment variable:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export MANPAGER="sh -c 'awk '\''{ gsub(/\x1B\[[0-9;]*m/, \"\", \$0); gsub(/.\x08/, \"\", \$0); print }'\'' | bat -p -lman'"
|
export MANPAGER="bat -plman"
|
||||||
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)
|
||||||
|
|
||||||
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).
|
||||||
|
|
||||||
> [!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.
|
|
||||||
|
|
||||||
Note that the [Manpage syntax](assets/syntaxes/02_Extra/Manpage.sublime-syntax) is developed in this repository and still needs some work.
|
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`
|
||||||
|
|||||||
Reference in New Issue
Block a user