[GRASS-dev] [GRASS GIS] #1858: inconsistancy g.parser on command console and command line

#1858: inconsistancy g.parser on command console and command line
---------------------------+------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Shell Scripts | Version: svn-trunk
Keywords: | Platform: Linux
      Cpu: Unspecified |
---------------------------+------------------------------------------------
If you have a script r.test with amongst others the following in the
header:

{{{
#%flag
#% key: s
#% description: run r.report on output map?
#% answer : 1
#%END
}}}

Opening the GUI interface via the command line will show the flag S unset.
Opening the GUI interface via the command console in the GRASS GIS layer
manager shows the flag S as set (see attached screenshot for
clarification)

Running GRASS 7.0 on Ubuntu 12.10

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1858&gt;
GRASS GIS <http://grass.osgeo.org>

#1858: inconsistancy g.parser on command console and command line
---------------------------+------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Shell Scripts | Version: svn-trunk
Keywords: | Platform: Linux
      Cpu: Unspecified |
---------------------------+------------------------------------------------

Comment(by martinl):

I would say that your wish goes against logic of flags. Parser doesn't
care about default answer for flags. In your case invert your flag.

{{{
#% description: do not run r.report on output map
}}}

I would suggest to close this ticket as 'invalid'

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1858#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1858: inconsistancy g.parser on command console and command line
----------------------------+-----------------------------------------------
  Reporter: pvanbosgeo | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Shell Scripts | Version: svn-trunk
Resolution: invalid | Keywords:
  Platform: Linux | Cpu: Unspecified
----------------------------+-----------------------------------------------
Changes (by pvanbosgeo):

  * status: new => closed
  * resolution: => invalid

Comment:

OK, point taken, closing thicket

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1858#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1858: inconsistancy g.parser on command console and command line
----------------------------+-----------------------------------------------
  Reporter: pvanbosgeo | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Shell Scripts | Version: svn-trunk
Resolution: invalid | Keywords:
  Platform: Linux | Cpu: Unspecified
----------------------------+-----------------------------------------------

Comment(by glynn):

Replying to [comment:1 martinl]:
> Parser doesn't care about default answer for flags.
It's more accurate to say that the default answer for a flag should always
be zero, as it's impossible to "unset" a flag from the command line.

r54754 modifies g.parser so that "answer" is not a valid parameter for
flags.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1858#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>