Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > 595a829ee03ff66649409b4b2aa16a22 > files > 18

gengetopt-2.22.4-1mdv2010.1.x86_64.rpm

# Name of your program
package "sample1" # don't use package if you're using automake
# Version of your program
version "2.0"   # don't use version if you're using automake

# Options
option  "str-opt"         s "A string option, for a filename"
        string typestr="filename"     optional
text "\nA brief text description"
text " before the other options.\n"
option  "my-opt"          m "Another integer option, \
this time the description of the option should be \"quite\" long to \
require wrapping... possibly more than one wrapping :-) \
especially if I\nrequire a line break"      int     optional
option  "int-opt"         i "A int option"         int        yes
section "more involved options" 
        sectiondesc="the following options\nare more complex"
text ""
option  "flag-opt"        - "A flag option"        flag       off
option  "funct-opt"       F "A function option"    optional 
    details="\nA function option is basically an option with no argument.\
  It can be used, e.g., to specify a specific behavior for a program.

Well, this further explanation is quite useless, but it's only to \
show an example of an option with details, \
which will be printed only when --detailed-help is given \
at the command line."
section "last option section"
option  "long-opt"        - "A long option"        long       optional
option  "def-opt"         - "A string option with default" 
        string default="Hello" optional
option  "enum-opt"         - "A string option with list of values" 
        values="foo","bar","hello","bye" default="hello" optional
option  "secret"         S "hidden option will not appear in --help" 
        int optional hidden
option  "dependant"         D 
        "option that depends on str-opt" int optional dependon="str-opt"
text "\nAn ending text."