help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU utility to generate --help


From: Karl Berry
Subject: Re: GNU utility to generate --help
Date: Sat, 7 Jan 2006 16:27:39 -0600

Hi Paulo,

    information and it seems like there is a 'template' for this --help

The template, such as it is, is described in the GNU coding standards.
http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces

You can figure out the common formatting that most of us follow in
practice just by looking at the examples from coreutils, texinfo, etc.
(Don't look at diffutils, though. :)  If any questions, feel free to ask.

    Is there any script/software to generate --help replies and put
    them in my C++ software?

Not exactly (that I know of).  There are some extended getopt-like
libraries which will let you define a help string with each option,
namely GNU autogen and (I think) GNU gengetopt.  (I don't know about C++
support.)  This has obvious advantages, although I personally just write
the help message as a string constant (more or less).

On a related note, once a --help message is written, you can generate
the same info in man page format using GNU help2man.  This is useful for
a number of GNU packages.

Best regards,
Karl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]