Opened 12 years ago

Closed 12 years ago

Last modified 12 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 12 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)

by pvanbosgeo, 12 years ago

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 by martinl, 12 years ago

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 by pvanbosgeo, 12 years ago

Resolution: invalid
Status: newclosed

OK, point taken, closing thicket

in reply to:  1 comment:3 by glynn, 12 years ago

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.