summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgldrk <me@rarity.fan>2023-10-04 05:36:30 +0300
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-10-06 23:34:26 +0000
commit5eaec0c56f2afac5dea8f63f7a7b01c26e06382a (patch)
tree7df9071c7d2c69907b6dfcb2bb0f691f4336d829
parentb8ee816d8045b4a0c216825ed96a5e0515c6d94e (diff)
Restore formatting with modern man-db
-rw-r--r--misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index da8744a..fd5a3d2 100644
--- a/misc.c
+++ b/misc.c
@@ -662,7 +662,8 @@ ConstructCommand(char *cmdbuf, const char *path,
const char *filename, const char *tempfile)
{
#ifdef HAVE_MANDB
- int used = snprintf(cmdbuf, BUFSIZ, "man -l %s > %s 2>/dev/null",
+ int used = snprintf(cmdbuf, BUFSIZ, "MAN_KEEP_FORMATTING=x GROFF_NO_SGR= "
+ "man -l %s > %s 2>/dev/null",
filename, tempfile);
if (used >= BUFSIZ - 1)
return FALSE;