https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249297
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: b...@freebsd.org Reporter: memrefl...@pm.me Created attachment 217939 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=217939&action=edit Honor MANSECT and -S section-list when matching section names man(1) relies on the default list of manual sections when determining whether 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 default 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-posix/ -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"