Hi Moritz, On Tue, May 5, 2015 at 2:27 PM, Moritz Lennert <mlenn...@club.worldonline.be > wrote:
> On 05/05/15 12:28, Margherita Di Leo wrote: > >> Dear All, >> >> I find the current syntax of g.remove a bit cumbersome, because it >> doesn't seem to me in line with what happens with other commands. >> If I want to remove the vector file foo, I have to type: >> >> g.remove vect name=foo -f >> >> Without the "name=" it won't work, which is not in line to the usage of >> other commands. >> To me it would be more natural (and indeed i always type wrong the first >> time) something like: >> >> g.remove vect name foo -f >> >> being name one of the two options (name, pat) that could be identifier= >> or something better. In this case, it would be possible to type the >> former command or the extended form: >> >> g.remove type=vect identifier=name name=foo -f >> or >> g.remove type=vect identifier=pattern name="f*" -f >> (g.remove vect pat "f*" -f) >> >> what do you think? >> > > AFAIK, this would mean a fundamental change in the way the parser works. > hmm.. I don't understand why. I tried to tailor this proposal on the current behavior of the parser, as far as I could understand it. Can you explain a bit more? > > I think it might be better to create small wrapper scripts, e.g.: > > g.remove.vect > > which could use just the name option of g.remove to have a syntax such as > this: > > g.remove.vect foo -f > > If you use GNU/Linux you can also do this very simply by defining a > function in .grass7/bashrc: > > g.remove.vect () > { > g.remove type=vect name=$@ > } > Thanks for the idea, I'll try . -- Best regards, Dr. Margherita DI LEO Scientific / technical project officer European Commission - DG JRC Institute for Environment and Sustainability (IES) Via Fermi, 2749 I-21027 Ispra (VA) - Italy - TP 261 Tel. +39 0332 78 3600 margherita.di-...@jrc.ec.europa.eu Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev