[GRASS-dev] new flags --g

Hamish hamish_b at yahoo.com
Sat May 9 10:59:00 EDT 2009


Martin Landa wrote:
> would make sense to you to introduce new global flag for
> shell style module output?
> 
> '--g'
> 
> Then all '-g' flags and similar flags with different key
> could be replaced by '--g'. In the case of g.region
> 
> `g.region -g` would be changed to `g.region -p --g`
> 
> Also grass python interface could be simplified to
> 
> grass.read_command('g.region', flags='p', shellstyle = True).
> 
> Shell style output is widely used in the scripts and at the
> end also in the wxGUI. The global flag could simplify the
> usage. Moreover some modules uses '-g' for other purposes
> which is quite confusing.


to be honest I'm not overly enthusiastic about the idea.
partially from the mess we had when we tried it with g.region
before.

It's hard enough to know now when a module will really do
anything different when using the --verbose flag (most do the
same but some give really important info with it) which is
advertised for all modules. you'd just have to guess when an
option had a shell-style version programmed in.

[maybe add a new module->has_verbose, module->has_shell module
init flags?]

if using two dashes you might as well use a word, not the
meaningless "-g". eg --script-style.

and only for grass7 if it does happen.


Hamish


      



More information about the grass-dev mailing list