>> Do you have any solution on how to format examples so that they look >> correct in both gengetopt help and man page? I'd like to have it in >> the following form: >> >> 1. if example and its description are short enough they should be >> placed on the same line with a tab between them >> 2. if example and its description are longer then place the >> description below and make some indentation as for the options. > > Yegor, I tried with this reduced .ggo file (I modified it): > > # Name of your program > package "hwtest" # don't use package if you're using automake > # Version of your program > version "1.2.1" # don't use version if you're using automake > > args "--conf-parser" > > # Options > section "Common options" > sectiondesc="this options are common to all test modules" > text "" > option "cfg" - "Configuration file" string typestr="filename" > optional > option "cycles" - "Number of test cycles" int default="0" optional > text "\n" > text "Examples:\n\n" > > text "hwtest --cycles=1 --size=4096 --net --verbose\n\n" > text "execute network test with 4096 byte big test file in verbose mode\n" > text "\n" > > text "hwtest --cycles=1 --mpci\n" > text "execute MiniPCI test\n" > text "\n" > > and the first line of help is formatted correctly by help2man, since it > contains a double \n (while the second one is not, since it contains > only one \n): > > EXAMPLES > hwtest --cycles=1 --size=4096 --net --verbose > > execute network test with 4096 byte big test file in verbose mode > > hwtest --cycles=1 --mpci execute MiniPCI test > > so it's just a matter of formatting the examples text as help2man > expects, I guess... > > or am I missing something?
Thank you for this example. I'll follow your advice and add extra \n for now. But what I wanted to say was, I'd like examples to be handled as options. Like this: section "Examples" (perhaps without sectiondesc) example "example string" - "examples description" and the formatting should also be the same as for the options. What do you think about it? Regards, Yegor _______________________________________________ Help-gengetopt mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gengetopt
