Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1858 closed defect (invalid)

inconsistancy g.parser on command console and command line

Reported by: pvanbosgeo Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Shell Scripts Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Linux

Description

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

Attachments (1)

screenshot.png (70.3 KB) - added by pvanbosgeo 8 years ago.
Showing difference in how g.parser handles Flags set to 1 when run from command line vs command console in GRASS Layer Manager.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by pvanbosgeo

Attachment: screenshot.png added

Showing difference in how g.parser handles Flags set to 1 when run from command line vs command console in GRASS Layer Manager.

comment:1 Changed 8 years ago 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'

comment:2 Changed 8 years ago by pvanbosgeo

Resolution: invalid
Status: newclosed

OK, point taken, closing thicket

comment:3 in reply to:  1 Changed 8 years ago by glynn

Replying to 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.

Note: See TracTickets for help on using tickets.