[GRASS-dev] Added suppress_required field to flags

Glynn Clements glynn at gclements.plus.com
Thu Nov 25 12:50:15 EST 2010


"struct Flag" now has a boolean ->suppress_required field. If this
field is set on a flag, and that flag is given on the command line,
the parser won't check whether ->required options were provided.

This will allow options which are normally required to be marked as
required even if there are special cases which override this
requirement, e.g. a -l (list) flag or other "alternate mode" flags.

However, this feature cannot be used until the GUI's own requirement
checking has been adapted to understand it. Currently, if an option
marked as ->required is omitted but a flag marked as
->suppress_required is given, the command itself won't complain about
the missing option but the GUI will.

The field is included in the --interface-description output; the GUI
just needs to be updated to make use of it.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list