Bug 273755 - apropos.1 references options in man.1 that don't exist
Summary: apropos.1 references options in man.1 that don't exist
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL: https://github.com/freebsd/freebsd-sr...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-13 07:34 UTC by Alexander Ziaee
Modified: 2023-09-16 17:47 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Ziaee 2023-09-13 07:34:15 UTC
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).