Closed genotrance closed 5 years ago
I think you want to use ,+=
not +=
. as in (one of my test programs) ./test/AllSeqTypes --s,+=,a,b
.
Users will never know to use that operator! Wish it was documented on cligen to know these nuances.
It is in --help-syntax, provided to every command generated by cligen. I have a new version of that text in a not quite released version. It might be clearer. It's a very advanced usage mode, though. People may not guess that it even exists. Not sure what to do about that.
(that text == that --help-syntax help text).
There is a large discussion thread here about this feature: https://github.com/c-blake/cligen/issues/71 that was about the re-design from CLI-author-driven-delimiter/delimiting convention choice to CLI-user-driven things.
Consider:
symOverride: seq[string] = @[]
If I specify
--symOverride=A,B,C,D
, I get a correct@["A", "B", "C", "D"]
.If I specify
--symOverride+=A,B,C,D
, with the+
, I get a wrong@["A", "AB", "ABC", "ABCD"]
.This means I cannot do the following:
--symOverride=A,B,C,D --symOverride+=E,F,G,H
which results in@["A", "B", "C", "D", "E", "EF", "EFG", "EFGH"]
. After the first=
, any+=
can only add one at a time.