discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Warren Block <wblock@wonkity.com>
To: discuss@mdocml.bsd.lv
Cc: wblock@FreeBSD.org
Subject: pkg man pages
Date: Mon, 20 Jul 2015 18:24:56 -0600 (MDT)	[thread overview]
Message-ID: <alpine.BSF.2.20.1507201758190.61628@wonkity.com> (raw)

You have probably heard about the pkg project, FreeBSD's rework of the 
package database.  Well, we've been looking at the man pages for those 
commands.  It's clear the synopsis sections need work, but less clear 
which way is the best, clearest way to format those sections in mdoc.

Since you guys are the experts, I'd like to ask your opinion.

As an example, consider pkg-check.8:
https://github.com/freebsd/pkg/blob/master/docs/pkg-check.8

   pkg check [-Bdsr] [-nqvy] [-a | -Cgix pattern]

There are four main commands, [-Bdsr].  I don't think these are 
actually optional.

There are some optional options, -nqvy.

Then there is [-a | -Cgix pattern], to operate on all packages or a 
pattern match for package name.  The options on the pattern make it 
possible to be case sensitive and so on.

Then there are GNU-style double-dash duplicate variants for all of the 
above.  I find the way these are currently shown to be confusing:

[--{shlibs,dependencies,checksums,recompute}]

meaning --shlibs or --dependencies and so on.  The options will not fit 
on a single line, so the [] markers are kind of difficult to see.


The other pkg commands have very similar options, so it would be nice to 
get it right before changing any of them.

I'd say the first part of the synopsis should look something like this 
(less markup):

   pkg check -B|-d|-s|-r [-nqvy] [-a|-Cgix pattern]

Then a second version could be shown with the long options.  But when 
some commands get to be this complicated, they sometimes go to a generic 
form:

   pkg check command [options] [packages]

   Where "command" is

     -B or --shlibs is used to...
     -d or --dependencies does something...
     -s or --checksums checks checksums...
     -r or --recompute recomputes...

   And "options" are...

Can you recommend examples of the right way to do this?

Thanks!
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

             reply	other threads:[~2015-07-21  0:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21  0:24 Warren Block [this message]
2015-07-21  5:44 ` Ingo Schwarze
2015-07-21 10:44   ` Thomas Klausner
2015-07-21 22:25     ` Warren Block

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=alpine.BSF.2.20.1507201758190.61628@wonkity.com \
    --to=wblock@wonkity.com \
    --cc=discuss@mdocml.bsd.lv \
    --cc=wblock@FreeBSD.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;
as well as URLs for NNTP newsgroup(s).