[GRASS-dev] Re: doubt with single/double dashed flags from interface description

Glynn Clements glynn at gclements.plus.com
Wed May 25 17:49:35 EDT 2011


Markus Metz wrote:

> > All modules accept --overwrite, regardless of whether it's listed. If
> > there are no "new" options, the parser doesn't perform overwrite
> > checks, but it will still set GRASS_OVERWRITE=1.
> 
> Useful for e.g. g.copy rast=rast,myrast --o on the command line (in
> the wxGUI there is no overwrite option for g.copy)

Each option has a single gisprompt field, even if it takes multiple
values of different types (via the key_desc field).

It isn't possible for an option to be both "old" and "new". If it was
declared "new", you would be forced to use --overwrite to avoid errors
due to the source maps existing.

g.copy's options are all declared "old", which is mostly harmless as
G_parser() doesn't check that the maps actually exist.

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


More information about the grass-dev mailing list