[dev] [dev] Usage, -h, --help, help, synopsis, …

From: Alexander Teinum <ateinum_AT_gmail.com>
Date: Tue, 17 Aug 2010 17:40:40 +0200

What is the most concise way of outputting a usage and help text?

Must the usage text be unambiguous when it comes to valid combinations?

What should the program option or options be named that show the usage
or help text?

Are there any existing standards for usage and help text?

How should the usage text and help text be formatted?

– Keep it within 80 characters?
– Use of whitespace
– Use of lower- and uppercase
– Wether to use “typographical correct” punctuation marks (“, ”, ‘, ’,
… instead of ", ", ', ', ...) or not

E-mail from pancake:

> The help messages in unix have different standards. And they aim to be
> short, simple and keep some common rules. The reason is because this way you
> can read them faster.
> In bsd. Help message is just one line. If you want description you have to
> refer to the manpage or readme.
> In gnu they tend to display a 4screenscrolling help message which is really
> anoying.
> Theorically the help length is another way to measure the complexity of the
> program.
> feel free to fwd this mail to the mailing list and continue the discussion
> there. It can be another interesting topic.
> For flo. I would suggest a oneline help or maybe somethung like this:
> flo [-r id] [-wch] [msg]
> -r id : remove reminder with id.
> ...
> Im just telling the flags as an idea.
> another thing..is that in suckless sw we usually prefer to not use getopt.
> The code looks ok. But the implementation in libc is horrendous. So a single
> switchcase would be better.
> Hope this helps
> --pancake


Received on Tue Aug 17 2010 - 17:40:40 CEST

This archive was generated by hypermail 2.2.0 : Tue Aug 17 2010 - 17:48:02 CEST