On 05/05/15 15:41, Margherita Di Leo wrote:
Hi Moritz,
On Tue, May 5, 2015 at 2:27 PM, Moritz Lennert
<[email protected] <mailto:[email protected]>> 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?
AFAIK, the parser only accepts the first argument as positional
argument, for all the other arguments you have to provide the parameter
name, so in your proposal
g.remove vect id=name searchstring=foo
would work, but
g.remove vect name foo
wouldn't.
As a side question: why do you find
g.remove type=vect id=pattern name="f*"
easier
than the current
g.remove type=vect pattern="f*"
?
The current behaviour does mean less typing (and just as much compared
to your proposal with positional parameters, except for the '=').
Moritz
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev