File: sample1.ggo.texinfo

package info (click to toggle)
gengetopt 2.22.6+dfsg0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,732 kB
  • sloc: cpp: 14,709; sh: 11,845; ansic: 8,030; makefile: 689; yacc: 514; lex: 171; sed: 3
file content (42 lines) | stat: -rw-r--r-- 1,924 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite
@example
# 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."

@end example