Date: Mon, 14 Sep 2020 01:09:15 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 249297] man: manual pages in non-default sections not found Message-ID: <bug-249297-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D249297 Bug ID: 249297 Summary: man: manual pages in non-default sections not found Product: Base System Version: 12.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: memreflect@pm.me Created attachment 217939 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D217939&action= =3Dedit Honor MANSECT and -S section-list when matching section names man(1) relies on the default list of manual sections when determining wheth= er an argument is a section name, completely ignoring the MANSECT environment variable and the sections listed in the argument to the -S option. I encountered this behavior when trying to determine why man -S '1:3p' '3p' printf would open printf(1) instead of printf(3p) after installing man-pages-posix= [1], yet man -S '3p' printf worked correctly. Attached is a patch that ensures the section list provided by either the -S option (which sets the MANSECT shell variable) or the MANSECT environment variable is searched if they don't expand to an empty string, else the defa= ult section list is searched. It intentionally avoids setting the MANSECT shell variable since that's taken care of later by the man_setup() function. [1]: https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/man-pages-pos= ix/ --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-249297-227>