[GRASS-dev] Re: g.mlist, g.mremove fails in non-English locale

Glynn Clements glynn at gclements.plus.com
Mon Apr 7 14:40:24 EDT 2008


Hamish wrote:

> >  > The long term fix is to rewrite g.mlist not to be a hack.
> > 
> > 	It's rather `g.list' that should be extended to output in
> > 	machine-readable form.  (I've already suggested the `-1' and
> > 	`--no-decoration' options to achieve that, though I haven't
> > 	prepared a patch as of yet.)
> 
> right. I wonder how to deal with multiple mapsets? fully qualify
> name at mapset for all map names or use a #header line with the mapset name
> before each new mapset listing? Probably fully qualify everything: it's
> easy enough to strip off the mapset with 's/@.*$//' or `cut -f1 -d@` and
> much less weird to deal with.

Using header lines requires stateful parsing, which complicates
matters.

For machine readable output, provide an option to output either
qualified or unqualified names. Qualified names should be the default,
IMHO. Unqualified names are a convenience for interactive use, to save
the user from having to type @mapset every time. Where map names are
passed within or between programs, qualified names should always be
used.

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


More information about the grass-dev mailing list