[Bug 271830] man: ignores MANSECT and -S

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 04 Jun 2023 22:58:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271830

            Bug ID: 271830
           Summary: man: ignores MANSECT and -S
           Product: Base System
           Version: 13.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: mohd.akram@outlook.com

The following should work whether MANSECT is set in a man.conf file, via an
environment variable, or via the -S flag. It fails in all cases.

To reproduce:

MANSECT=1p man 1p grep

or

man -S 1p 1p grep

Expected output:

No manual entry for grep

Actual output:

No manual entry for 1p
No manual entry for grep


To reproduce:

MANSECT=3 man 1 grep

or

man -S 3 1 grep

Expected output:

No manual entry for 1
No manual entry for grep

Actual output:

grep(1) man page is displayed

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