4

I have installed GNU utils as suggested here

brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt grep 

And now I have man grep for macOS grep and man ggrep for GNU grep. But for some reason when I use man ggrep there is a warning:

This manpage is not compatible with mandoc(1) and might display incorrectly.

Why is that? How to properly fix it?

Manpages of the other GNU utils, such as man gcp, don't have this problem.

2
  • Do you also get the actual man page displayed, or not? Perhaps GNU man is trying to read the original Apple man page for grep? Commented Aug 19, 2024 at 9:42
  • @benwiggy The manpages are different. If I press G to scroll to the very bottom, it is macOS 14.5, November 10, 2021 for man grep and GNU grep 3.11, 2019-12-29 for man ggrep Commented Aug 19, 2024 at 9:57

1 Answer 1

11

A number of version of macOS ago, Apple decided to remove the groff typesetting software, from macOS, in favor of using mandoc to render manpages. The "error" message is informational and for most manpages is innocuous.

Edit: Using the groff package from Homebrew, the syntax would look like-

 gunzip -qfc -- /absolute/path/to/manpage/ggrep | /absolute/path/to/bin/tbl | /absolute/path/to/bin/groff -Wall -mtty-char -mandoc -Tascii -P -c | less -is 
2
  • I have installed groff (brew install groff, groff -v: GNU groff version 1.23.0), but man ggrep still shows me a warning. Could you show how to open the ggrep manpage using groff instead of mandoc? Commented Aug 19, 2024 at 12:35
  • How to get the x-man-page:// window to by default also use groff? Commented Sep 9, 2024 at 0:53

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.