Package: glib

Function g-option-context-ignore-unknown-options

Lambda List

g-option-context-ignore-unknown-options (context)

Syntax

(g-option-context-ignore-unknown-options context) => ignore
(setf (g-option-context-ignore-unknown-options context) ignore)

Arguments

context -- a g-option-context instance
ignore -- true to ignore unknown options, false to produce an error when unknown options are met

Details

The g-option-context-ignore-unknown-options function returns whether unknown options are ignored or not. The (setf g-option-context-ignore-unknown-options) function sets whether to ignore unknown options or not. If an argument is ignored, it is left in the list of command line arguments after parsing. By default, the g-option-context-parse function treats unknown options as error.

This setting does not affect non-option arguments, i.e. arguments which do not start with a dash. But note that GOption cannot reliably determine whether a non-option belongs to a preceding unknown option.
 

See also

2021-9-18