From 59c58969024d48c0575c42250c7dd87a70106fbd Mon Sep 17 00:00:00 2001 From: Alex Kirk Date: Thu, 11 Dec 2025 05:20:50 +0100 Subject: [PATCH] Simplify MANPAGER guide --- CHANGELOG.md | 4 ++-- README.md | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dafc2347..91fc1ba7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ ## Features -## Bugfixes - - 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 custom themes. See #3524 (@keith-hall) diff --git a/README.md b/README.md index eb0da902..771db7ad 100644 --- a/README.md +++ b/README.md @@ -195,18 +195,13 @@ bat main.cpp | xclip `MANPAGER` environment variable: ```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 ``` (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). -> [!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. #### `prettier` / `shfmt` / `rustfmt`