Bug 193460

Summary: Suggestion: add a section resume in man manpage
Product: Documentation Reporter: Matthieu Volat <mazhe>
Component: Books & ArticlesAssignee: Allan Jude <allanjude>
Status: Closed FIXED    
Severity: Affects Only Me CC: allanjude, wblock
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Matthieu Volat 2014-09-08 10:07:09 UTC
Maybe it is a bit silly, but I recently needed some kind of "official reference" on manpage sections in FreeBSD and realized that no manpage provided it. The best I could come up with was to do `for i in {1..9}; do man $i intro|head -n1; done`.

Would it be considered useful to add such a list in the DESCRIPTION part of man(1)? Maybe reformat the beginning to something like:

------------------------------------------------------------------------------
DESCRIPTION
     The man utility finds and displays online manual documentation pages.  If
     mansect is provided, man restricts the search to the specific section of
     the manual.

     The currently available sections are:
          1   general commands (tools and utilities)
          2   system calls and error numbers
          3   C libraries
          4   devices and device drivers
          5   file formats
          6   games
          7   miscellaneous
          8   system maintenance procedures and commands
          9   system kernel interfaces

     Options that man understands:
     [...]
------------------------------------------------------------------------------

(of course, feel free to reword as needed)

thanks for your time
Comment 1 Allan Jude freebsd_committer freebsd_triage 2014-09-08 15:25:41 UTC
I agree, I was looking for the same thing, and ended up using the dropdown list from man.cgi as a "source of truth"

I'll mark this up and propose a patch
Comment 2 Warren Block freebsd_committer freebsd_triage 2014-09-08 19:12:37 UTC
These are in the intro(1)-intro(9) pages.  I agree that a simple list in man(1) would be helpful.  Those intro pages should also be included in the See Also.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-09-25 21:35:26 UTC
A commit references this bug:

Author: allanjude
Date: Thu Sep 25 21:34:57 UTC 2014
New revision: 272135
URL: http://svnweb.freebsd.org/changeset/base/272135

Log:
  Update man(1) to list the different sections of the manual

  Add each of the intro sections to the 'Also See' list

  PR:		193460
  Differential Revision:	D834
  Approved by:	bcr (mentor)
  Sponsored by:	ScaleEngine Inc.

Changes:
  head/usr.bin/man/man.1