#3724·bat

Man pages displaying bold reset code 22m

Author: AnntoinCreated May 5, 2026Updated Sep 6, 2026
Labelsbug

Using MANPAGER="bat -pl man" to colourise man pages. Tested with a few different pagers with BAT_PAGER and they all show unwanted output for this code.

  • BAT_PAGER="less" MANPAGER="bat -pl man" man uname (with BAT_PAGER="ov" we get the same output)

  • BAT_PAGER="moor" MANPAGER="bat -pl man" man uname

Using --strip-ansi fixes the issue visually but it also removes any OSC8 links. MANROFFOPT="-c" also strips links and interestingly causes it's own visual issues, e.g. MANROFFOPT="-c" BAT_PAGER="less" MANPAGER="bat -pl man" man uname:

...

How did you install bat?

nixpkgs via home-manager

bat version and environment

Software version

bat 0.26.1

Operating system

  • OS: Linux (Arch Linux)
  • Kernel: 7.0.3-arch1-1

Command-line

/home/anntoin/.nix-profile/bin/bat -pl man --diagnostic 

Environment variables

BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_PAGER=moor
BAT_PAGING=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
COLORTERM=truecolor
LANG=en_IE.UTF-8
LC_ALL=<not set>
LESS='-ix8RmPm Manual page uname(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page uname(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$'
MANPAGER='bat -pl man --diagnostic'
NO_COLOR=<not set>
PAGER=moor
SHELL=/usr/bin/bash
TERM=foot
XDG_CACHE_HOME=<not set>
XDG_CONFIG_HOME=<not set>

System Config file

Could not read contents of '/etc/bat/config': No such file or directory (os error 2).

Config file

--theme='Catppuccin Frappe'

Custom assets metadata

bat_version: 0.26.1
creation_time:
  secs_since_epoch: 1777991462
  nanos_since_epoch: 240002769

Custom assets

  • metadata.yaml, 97 bytes
  • syntaxes.bin, 1012454 bytes
  • themes.bin, 58318 bytes

Compile time information

  • Profile: release
  • Target triple: x86_64-unknown-linux-gnu
  • Family: unix
  • OS: linux
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: fxsr,sse,sse2
  • Host: x86_64-unknown-linux-gnu

Less version

> moor --version 
v2.12.1