Util-Linux package development
 help / color / mirror / Atom feed
From: "Benno Schulenberg" <bensberg@justemail.net>
To: kerolasa@gmail.com
Cc: "Karel Zak" <kzak@redhat.com>, "util-linux" <util-linux@vger.kernel.org>
Subject: Re: man-pages and usage() howto
Date: Tue, 16 Aug 2011 11:03:44 +0200	[thread overview]
Message-ID: <1313485424.19019.140258130122469@webmail.messagingengine.com> (raw)
In-Reply-To: <CAG27Bk0LpsVdCJhvOAstC_OpckzfBB05kcZcN_ByF_i_JQU6SQ@mail.gmail.com>


On Mon, 15 Aug 2011 21:12 +0200, "Sami Kerola" <kerolasa@iki.fi> wrote:
> On Mon, Aug 15, 2011 at 16:19, Karel Zak <kzak@redhat.com> wrote:
> > =C2=A0* argument required:
> >
> > =C2=A0 -o, --option FILE =C2=A0 =C2=A0# usage()
> > =C2=A0 -o, --option file =C2=A0 =C2=A0# man page
>=20
> I used GNU notation which has 'unnecessary' equals sign.
>=20
> -o, --option=3DFILE

The full GNU style seems to be this (for example in 'man grep'):

  -o FILE, --option=3DFILE

Since the util-linux man pages don't put the argument after the short
version of the option, the '  -o, --option FILE' variant would be for me
the logical condensed intersection.  Also, why give the impression
that the equals sign is needed when it is not?
=20
> The only reason I can think of why the equal sign is there is visual
> similarity with optional argument... [...]
>=20
> I also acknowledge the fact that no-one will ever use equals sign when
> giving required argument. The practise of dropping it is a rational
> reason not to specify it to usage() or man. I would say this is a
> question of choosing a convention in between visual symmetry or actual
> habits of people. IMHO the visual unity is better.

IMHO visual contrast is better.  When my fleeting glance sees an equals
sign OR square brackets, I know the argument is optional; when it does
not see an equals sign OR does not see square brackets, the argument is
required.  Redundancy is good.


> > =C2=A0 =C2=A0 =C2=A0 =C2=A0command [options] file

If in the usage() help text the arguments of options are written in
uppercase, wouldn't it be more consistent to then also write the
arguments of the command itself in uppercase (as for example
'man -h' and 'grep --help' do)?

        command [OPTIONS] FILE

(Also, to be fully correct, it would have to say "[OPTION...]" instead,
but I will let that go.)

About the other things I have not yet an opinion.

Regards,

Benno

--=20
http://www.fastmail.fm - Access all of your messages and folders
                          wherever you are

  reply	other threads:[~2011-08-16  9:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15 14:19 man-pages and usage() howto Karel Zak
2011-08-15 19:12 ` Sami Kerola
2011-08-16  9:03   ` Benno Schulenberg [this message]
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=1313485424.19019.140258130122469@webmail.messagingengine.com \
    --to=bensberg@justemail.net \
    --cc=kerolasa@gmail.com \
    --cc=kzak@redhat.com \
    --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