[GRASS-dev] Does g.parser accept 2-byte flags?

Glynn Clements glynn at gclements.plus.com
Sun Nov 3 18:06:50 PST 2013


Nikos Alexandris wrote:

> Is it possible to define a series of flags -cl -ch -mi -ma for a bash shell 
> grass script, that g.parser will understand?

No. G_parser() (and thus g.parser) follows Unix convention in its
interpretation of flags, i.e. "-abc" is equivalent to "-a -b -c".

The double-dash flags (e.g. --quiet) are all hard-coded; it isn't
possible for a module to define its own.

If single-character flags aren't suitable for whatever reason,
consider using a multi-valued option, e.g. "flags=cl,ch,mi,ma".

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


More information about the grass-dev mailing list