[GRASS-dev] g.gisenv in gui
Glynn Clements
glynn at gclements.plus.com
Fri Jun 8 09:30:23 EDT 2007
Michael Barton wrote:
> Found another minor item that a small change could improve.
>
> g.gisenv does not behave like other GRASS commands in that you cannot launch
> the autogenerated gui by typing g.gisenv¹ from the command line. Instead,
> you get the current environment settings. You can only get the gui if you
> run it through some special processing in the GUI.
See Hamish's reply.
> Likewise, you can¹t get
> it to print out current environment settings from the gui unless you do some
> tricks with its execution.
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.
What it should probably do is to call G_parser() unconditionally, then
check for:
if (!get->answer && !set->answer && !store_opt->answer)
> To behave more normally¹ it needs a p flag. Then...
>
> g.gisenv -> autogenerated gui
> g.gisenv p -> print current settings.
>
> I suppose that this would break a bunch of scripts, but it would be nice if
> it could work consistently with other commands.
I suspect that this is unnecessary if the no-arguments check is fixed.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list