CVSROOT:        /cvs
Module name:    src
Changes by:     schwa...@cvs.openbsd.org        2025/08/28 10:37:25

Modified files:
        usr.bin/mandoc : main.c 

Log message:
If the -l option is not given to man(1), never interpret "name" command
line arguments as absolute or relative path names, not even for arguments
that contain a slash and that do not resolve to a page name.

While a quirk to sometimes treat arguments as path names has been
present and documented in man(1) implementations on Linux for a
long time - at least since man-1.5e (July 1998) and man_db-2.3.12
(April 2001) - it was never a good idea for the following reasons:

1. Such a quirk was never in any version of AT&T UNIX nor in BSD and
violates the spirit of the POSIX specification of man(1).  It was only
added to mandoc in 2018 (rev. 1.208), purely for man-db compatibility.
2. There is no good reason for anyone to use the quirk
because both mandoc and man-db support the -l option.
3. Documenting the quirk would degrade the quality of the man(1)
manual.  The canonical place for documenting it would be where
the "name" argument is described, i.e. in the very first paragraph,
but that would lend the quirk undue weight and complicate the
introductory paragraph in an unacceptable manner.
4. The quirk causes minor ambiguity.  For example, FreeBSD provides
about a dozen pages containing slashes in their names, NetBSD about
two dozen, and even OpenBSD provides two such pages.

Even the man-db maintainer, Colin Watson, does not like the quirk
and considers how to deprecate it.

This removal of the quirk was requested by deraadt@.

Reply via email to