[GRASS-dev] [GRASS GIS] #2409: last call for options keys consolidation

GRASS GIS trac at osgeo.org
Wed Dec 17 07:10:35 PST 2014


#2409: last call for options keys consolidation
----------------------------------+-----------------------------------------
 Reporter:  martinl               |       Owner:  grass-dev@…              
     Type:  task                  |      Status:  new                      
 Priority:  blocker               |   Milestone:  7.0.0                    
Component:  Default               |     Version:  unspecified              
 Keywords:  standardized options  |    Platform:  Unspecified              
      Cpu:  Unspecified           |  
----------------------------------+-----------------------------------------

Comment(by hcho):

 Replying to [comment:130 martinl]:
 > Replying to [comment:129 martinl]:
 >
 > > I think that it would be useful to modify parser to understand also
 `rast` (`rast3d is OK because '_' is treated as word separator).
 >
 > attachment:raster_3d.diff

 I'm generally against adding special cases in the code. IMHO, if the user
 types `rast`, s/he means `raster` not `raster_3d` and it shouldn't be
 ambiguous. Currently, the parser would stop with a parameter ambiguous
 error. I think it would be more useful to modify the parser such that it
 takes the shortest unambiguous parameter with no further underscores.

 For example,

 * modules with parameters `raster_map=` and `raster_3d=`: `rast` and
 `raster_` would be ambiguous.

 * modules with parameters `raster=` and `raster_3d=`: `r` and `rast` would
 match with `raster=` and `r3` and `rast3` with `raster_3d=`

 * modules with parameters `raster_map=` and `raster_map_2=`: `rast`
 ambiguous, `rmap` for `raster_map=` and `rmap2` for `raster_map_2=`

 * modules with parameters `raster_map=` and `raster_map2=`: `rast`
 ambiguous, `rmap` for `raster_map=` and `rmap2` for `raster_map2=`

 I'm not sure if I was clear enough here.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2409#comment:131>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list