GLib.OptionContext.prototype.set_ignore_unknown_options
function set_ignore_unknown_options(ignore_unknown: Boolean): void { // Gjs wrapper for g_option_context_set_ignore_unknown_options() }
Sets whether to ignore unknown options or not. If an argument is ignored, it is left in the @argv array after parsing. By default, GLib.OptionContext.prototype.parse treats unknown options as error.
This setting does not affect non-option arguments (i.e. arguments which don't start with a dash). But note that GOption cannot reliably determine whether a non-option belongs to a preceding unknown option.
Since 2.6
- ignore_unknown
true to ignore unknown options, false to produce an error when unknown options are met