[GRASS-dev] G_parser() changes in 7.0

Glynn Clements glynn at gclements.plus.com
Thu Jun 11 16:12:08 EDT 2009


Hamish wrote:

> > In 7.0, I have changed the way that the parser compares command-line
> > arguments against the list of defined options.
> > 
> > Rather than checking that the supplied option is a prefix of a defined
> > option, it splits the option name into words, treating underscores as
> > word delimiters, then checks that the supplied option is composed of
> > prefixes of individual words.
> 
> but in= and out= for input= and output= still work, right? (they seem to)
> those are probably the most common abbreviations.

Options can still be abbreviated to any prefix.

If none of a module's options contain underscores, the module should
be entirely unaffected.

If an option contains no underscores, the set of allowed abbreviations
will be unaffected (i.e. you can abbreviate it to any prefix). 
However, if another option contain underscores, its set of possible
abbreviations has increased. This may result in an abbrevation for
another option ceasing to be unique.

E.g. if a (hypothetical) module had options east_north= and end=,
previously en= would have been a unique abbreviation for end=, but now
it could refer to either east_north= or end=, so it would be
ambiguous.

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


More information about the grass-dev mailing list