[GRASS-dev] g.gisenv in gui
Glynn Clements
glynn at gclements.plus.com
Mon Jun 11 09:54:31 EDT 2007
Hamish wrote:
> Michael:
> > > Likewise, you can¹t get it to print out current environment settings
> > > from the gui unless you do some tricks with its execution.
>
> Glynn:
> > AFAICT, the problem with g.gisenv is that it checks for argc==1 before
> > calling G_parser(), so e.g. "g.gisenv --quiet" causes that check to
> > fail.
>
> g.gisenv just outputs to stdout. There's no G_message() or G_percent()
> or anything that would use --quiet. Just treat g.gisenv like it were
> "ls" and send the output to a buffer or a temp file.
The point is that *any* options (even ones which have no effect, e.g.
--quiet or --verbose) caused the argc==1 check to fail.
I've now changed it so that if you specify neither get= nor set=, it
will print the current settings.
Apart from not being confused by --quiet etc, you should now be able
to use "g.gisenv store=mapset" to list the VAR file.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list