[GRASS5] [bug #973] (grass) rgbcolors - d.save
Glynn Clements
glynn.clements at virgin.net
Thu Mar 21 15:02:28 EST 2002
Request Tracker wrote:
> Subject: rgbcolors - d.save
> I am using rgb-colors in d.area, i.e:
> GRASS:~ > d.area map=vaf fillcolor="rgb(100 147 237)" linecolor=none
> catnum=3101
>
> Which works just fine.
>
> But then I do a d.save;
> GRASS:~ > d.save -o
> d.area map=vaf fillcolor=rgb(100 147 237) linecolor=none catnum=3101 # 1
>
> As you see, the "s are missing, if I try to reuse the line, I'll get:GRASS:~
> > d.area map=vaf fillcolor=rgb(100 147 237) linecolor=none catnum=3101
> # 1
> bash: syntax error near unexpected token `fillcolor=rgb(1'
>
> It is of cource no really big deal to put in the "s, but i think d.save
> should have done it for me...
Ultimately it's G_recreate_command() which needs to be fixed[1]. You
can get it 99% right by just putting single quotes around each
argument; to get it completely right, you also have to replace any
single quotes with "'\''" (quote-backslash-quote-quote).
[1] I'll look at it at some point.
Also, this is a warning sign regarding the syntax. Even though the
issue is specifically addressed in the "NOTES" section of the d.area
manpage, I wouldn't be surprised if we get "bug" reports due to users
failing to quote the argument (there's already been one case of a user
attempting to use spaces in a multi-valued argument).
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list