[dev] Re: [dev] Re: [dev] Re: [dev] [dev] Usage, -h, --help, help, synopsis, �

From: Alexander Teinum <ateinum_AT_gmail.com>
Date: Wed, 18 Aug 2010 17:55:10 +0200

(Sorry for not quoting names. It�s cumbersome to do with less than one
person in Gmail.)

> With the above rules this should be: flo [-cfrtw arg] [what[,from][-to]]

I think that�s too little information.

> It also just makes the usage easier to read, in my opinion. Dropping a
> few characters just isn't worth any loss in clarity.

Valid point. Make things as simplistic as possible, but not simplisticr. :)

From the information that I have now, then I would think that this
should be fine:

usage: program [-a] [-b] [-c] [-f file] [-n number] blah
usage: flo [-a] [-c id] [-f from] [-r id] [-t to] [-w what] [what[,from][-to]]

I�d like to write a KISS option parser that accepts �program -c -a -f
some_file�, but not �program -ca -fsome_file�. I prefer to keep the
rules simplistic.

Is it okay to use three dots in the usage text? (See echo�s man page.)
I think it means that you can repeat what�s before the three dots.

How do you feel about sorting the options? Should it always be done?
Received on Wed Aug 18 2010 - 17:55:10 CEST

This archive was generated by hypermail 2.2.0 : Wed Aug 18 2010 - 18:00:04 CEST