Linux Manual Pages development
 help / color / mirror / Atom feed
From: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man <linux-man@vger.kernel.org>,
	"G. Branden Robinson" <g.branden.robinson@gmail.com>
Subject: Re: proc(5)'s sashimi
Date: Mon, 14 Aug 2023 22:10:52 -0500	[thread overview]
Message-ID: <ZNrsvD9KCmaBEYnO@dj3ntoo> (raw)
In-Reply-To: <72378b09-c74b-2d9d-4732-00acd656d052@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3854 bytes --]

On Mon, Aug 14, 2023 at 16:06:16 +0200, Alejandro Colomar wrote:
> Hi!
> 
> The day has come to cut the proc(5) tuna fish in very little pieces.

This is a great idea. Large man pages, while no problem for me
personally, are more often than not very intimidating and overwhelming
for newcomers.

> As a first step, I'm pasting the contents of proc(5) into little
> files, without changing any contents (not even the formatting).  For
> example see the two files at the bottom of this email.
> 
> I'd like to hear any comments before pushing such a change to the repo.
> I'll soon post a branch called 'proc' to my repo (I'll ping when it's
> done), so you can observe the changes).
> 
> One of the questions I have at the moment is how should we call the
> pages, and what should we write in the TH and NAME.  Branden, do you
> have any comments on that?  I used underscores for the page title and
> file name, but for the NAME I used slashes (so the actual name of the
> interface).  I didn't do any italics in the name, though, so /pid/ is
> no special in the name.
> 

OTTOMH, I can think of some prior art WRT to "namespaced/split man
pages" in at least git, btrfs-progs, and as of recently it seems,
cryptsetup. Some samples:


$ MANWIDTH=72 man git-range-diff | head
GIT-RANGE-DIFF(1)             Git Manual             GIT-RANGE-DIFF(1)

NAME
       git-range-diff - Compare two commit ranges (e.g. two versions
       of a branch)

SYNOPSIS
       git range-diff [--color=[<when>]] [--no-color] [<diff-options>]
               [--no-dual-color] [--creation-factor=<factor>]
               [--left-only | --right-only]


$ MANWIDTH=72 man btrfs-send | head
BTRFS-SEND(8)                    BTRFS                   BTRFS-SEND(8)

NAME
       btrfs-send - generate a stream of changes between two subvolume
       snapshots

SYNOPSIS
       btrfs send [-ve] [-p <parent>] [-c <clone-src>] [-f  <outfile>]
       <subvol> [<subvol>...]


$ MANWIDTH=72 man cryptsetup-resize | head
CRYPTSETUP-RESIZE(8)     Maintenance Commands     CRYPTSETUP-RESIZE(8)

NAME
       cryptsetup-resize - resize an active mapping

SYNOPSIS
       cryptsetup resize [<options>] <name>

DESCRIPTION
       Resizes an active mapping <name>.


> Cheers,
> Alex
> 
> ---
> 
> $ MANWIDTH=72 man ./proc_pid_gid_map.5 | cat
> proc_pid_gid_map(5)       File Formats Manual      proc_pid_gid_map(5)
> 
> NAME
>      /proc/pid/gid_map - group ID mappings
> 
> DESCRIPTION
>      /proc/pid/gid_map (since Linux 3.5)
>             See user_namespaces(7).
> 
> SEE ALSO
>      proc(5)
> 
> Linux man‐pages (unreleased)    (date)             proc_pid_gid_map(5)
> 
> 
> $ MANWIDTH=72 man ./proc_pid_attr.5 | cat
> proc_pid_attr(5)          File Formats Manual         proc_pid_attr(5)
> 
> NAME
>      /proc/pid/attr/ - security‐related attributes
> 

So, for these examples, perhaps proc-pid-gid-map.5 and proc-pid-attr.5
to fit in with our friends from above. Similarly for the title. I think
NAME should match how it exists on the filesystem (so leave that how you
have it now).

The /proc/pid/gid_map is an interesting case. The file itself has an
underscore, but having mixed dash and underscore (proc-pid-gid_map)
feels ugly even though it's technically more correct. A potential
solution to that problem is to have the man page be proc-pid-gid-map.5
and install a proc-pid-gid_map.5 symlink pointing to the page. Or vice
versa.

- Oskari

PS: A special shoutout goes to git. The fact that `git help $THING`
pulls up the man page for git-$THING, combined  with `git help` alone
providing some nice starting points, is a huge plus when it comes to the
discoverability of its documentation.

So in case whoever wrote that happens to read this -- many thanks <3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-08-15  3:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 14:06 proc(5)'s sashimi Alejandro Colomar
2023-08-15  3:10 ` Oskari Pirhonen [this message]
2023-08-15 11:41   ` Günther Noack
2023-08-15 17:07     ` Alejandro Colomar
2023-08-15 14:26   ` Brian Inglis
2023-08-15 16:46     ` Alejandro Colomar
2023-08-17 20:57       ` Alejandro Colomar
2023-08-15 15:36 ` G. Branden Robinson
2023-08-15 16:44   ` Alejandro Colomar
2023-08-15 21:47 ` Alejandro Colomar
2023-08-17 21:19   ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNrsvD9KCmaBEYnO@dj3ntoo \
    --to=xxc3ncoredxx@gmail.com \
    --cc=alx@kernel.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox