On Thu, 21 Jun 2018, Allin Cottrell wrote:
On Thu, 21 Jun 2018, Sven Schreiber wrote:
> It should be noted that the doc only talks about a string (literal) in
> double quotes. String variables came later in gretl I think. Then using
> --description=desc is ambiguous: Does the user mean the string variable
> with name desc, or a literal string with a sloppy use (without the double
> quotes)?
>
> So I don't think it's a bug, but I would also be OK to be strict about
> requiring the double quotes for literal strings.
I think we probably should enforce the "double-quotes needed" rule for the
sake of clarity.
Actually that's not so easy. All option parameters are in the first
instance treated as strings by the command-line parser and
double-quotes are just needed to stick together strings with
embedded spaces; they are stripped off before the string is stored.
So I'm not going to attempt this restriction now.
Going back a moment to Marcin's posting, it should be clear that
string desc = "This is something about my foo series"
setinfo foo3 --description=@desc
is not going to work. After string substitution the second line
reads
setinfo foo3 --description=This is something about my foo series
which is then read as setting a description of "This", followed by
uninterpretable trailing junk.
Allin