Skip to content

Restore formatting with modern man-db

gldrk requested to merge gldrk/xman:man-db-formatting into master

man-db has been stripping control characters from nroff output unless writing to a terminal device since 2004 (commit 4be7e4e94a9556b0ec4ef33241c5eadaa9dae321). Set the MAN_KEEP_FORMATTING environment variable to a non-empty string to suppress this feature.

In addition, on systems using groff, the upstream default for terminal output is to use ECMA-48 escape sequences instead of TTY-37 compatible ones that xman understands. While some distributions, such as Debian, modify this behavior, this is not the case on my system. Setting GROFF_NO_SGR should ensure things work properly in either case.

Merge request reports