Lambda Listg-option-group-add-entries (group entries) ArgumentsDetails Adds the options specified in entries to group.
The list of option entries has the following syntax. See the g-option-context documentation for a complete example.
(let ((entries '((long-name
short-name
flags
arg
arg-data
description
arg-description)
(<next option>)
)))
...) - long-name
- A string with the long name of an option can be used to specify it in a command line as --long-name. Every option must
have a long name. To resolve conflicts if multiple option groups contain
the same long name, it is also possible to specify the option as --groupname-long-name.
- short-name
- If an option has a short name, it can be specified -short-name in a command line. The argument short-name must be a printable ASCII character different from '-', or #Nul if the option has no short name.
- flags
- Flags from the g-option-flags bitfield.
- arg
- The type of the option, as a g-option-arg value.
- arg-data
- If the arg type is :callback, then arg-data must point to a GOptionArgFunc callback function,
which will be called to handle the extra argument. Otherwise, arg-data is a pointer to a location to store the value, the required type of the location depends on the arg type. If arg type is :string or :filename the location will contain a newly allocated string if the option was given.
- description
- A string with the description for the option in --help output. The description is translated using the translate-func of the group, see the function g-option-group-set-translation-domain.
- arg-description
- A string with the placeholder to use for the extra argument parsed by the option in --help output. The arg-description is translated using the translate-func of the group, see the function g-option-group-set-translation-domain.
g-option-context |
| See also |