From: Karel Zak <kzak@redhat.com>
To: Benno Schulenberg <bensberg@justemail.net>,
Sami Kerola <kerolasa@iki.fi>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: man-pages and usage() howto
Date: Mon, 15 Aug 2011 16:19:48 +0200 [thread overview]
Message-ID: <20110815141948.GH2038@nb.net.home> (raw)
Hi,
Sami is already working on some howtos, what we need is some
consensus about a way how describe options.
My suggestion:
* argument required:
-o, --option FILE # usage()
-o, --option file # man page
* optional argument:
-o, --option[=FILE] # usage()
-o, --option[=file] # man page
* synopsis
- without individual options, bad example:
command [-o offset] [--sizelimit size] [-p pfd] [-r] file
- [options] is better:
command [options] file
- use more synopsis lines if the command supports more separated modes.
command --add file
command --del file
(use common sense! ... if there is too many modes, then use [options])
The options specific to the mode are allowed in the synopsis or
in the man page should be per-mode section with description about
the options.
* common options:
-V, --version
-h, --help
* suggestions:
-a, --all
-o, --output <list>
-r, --raw
-f, --force
-b, --bytes (don't print SIZE in human readable format)
* We also need any consensus about groff formatting, the ideal
solution would be add any Documentation/example.man
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next reply other threads:[~2011-08-15 14:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 14:19 Karel Zak [this message]
2011-08-15 19:12 ` man-pages and usage() howto Sami Kerola
2011-08-16 9:03 ` Benno Schulenberg
2011-08-16 10:46 ` Karel Zak
2011-08-17 13:07 ` Sami Kerola
2011-08-20 9:10 ` Benno Schulenberg
2011-08-20 19:08 ` Sami Kerola
2011-08-21 10:56 ` Sami Kerola
2011-08-22 8:16 ` Karel Zak
2011-08-22 18:53 ` Sami Kerola
2011-08-22 20:38 ` Benno Schulenberg
2011-08-23 8:15 ` Sami Kerola
2011-08-23 18:55 ` Benno Schulenberg
2011-08-23 19:34 ` Sami Kerola
2011-08-16 10:39 ` Karel Zak
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=20110815141948.GH2038@nb.net.home \
--to=kzak@redhat.com \
--cc=bensberg@justemail.net \
--cc=kerolasa@iki.fi \
--cc=util-linux@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