[Bug 273755] apropos.1 references options in man.1 that don't exist

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 13 Sep 2023 07:34:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273755

            Bug ID: 273755
           Summary: apropos.1 references options in man.1 that don't exist
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: concussious.bugzilla@runbox.com

contrib/mandoc/apropos.1 (rendered) Line 66:
  The options -chlw are also supported and are documented in man(1).

These options are not documented in man(1).
apropos.1 is referencing mandoc man(1), but we are using FreeBSD man(1).

From mandoc man(1):
  -c    Copy the manual page to the standard output instead of using less(1) to
paginate it. This is done by default if the standard output is not a terminal
device.
  -h    Display only the SYNOPSIS lines of the requested manual pages. Implies
-a and -c.
  -l    A synonym for mandoc(1). The name arguments are interpreted as
filenames. No search is done and file, path, section, subsection, and -w are
ignored. This option implies -a.
  -w    List the pathnames of all matching manual pages instead of displaying
any of them. If no name is given, list the directories that would be searched.

I tested them:

-c does not appear to do anything.
-h prints alternating rows of periods.
-l does not make sense (to me) in the context of apropos.
-w works, is very helpful, and certainly must be mentioned.

apropos(1) certainly accepts these options at any rate.
I do not understand how to integrate these options into the manual.

Our man(1) is a very nice example to study and learn shell scripting, and has
extra features.

Issue present for all supported and development releases since the 2015 import
of mandoc apropos(1).

-- 
You are receiving this mail because:
You are the assignee for the bug.