getopt: How does arraySep work?
andre at s-e-a-p.de
Thu Jul 16 17:13:55 UTC 2020
On Thursday, 16 July 2020 at 05:03:36 UTC, Jon Degenhardt wrote:
> On Wednesday, 15 July 2020 at 07:12:35 UTC, Andre Pany wrote:
> An enhancement is likely to hit some corner-cases involving
> list termination requiring choices that are not fully generic.
> Any time a legal list value looks like a legal option. Perhaps
> the most important case is single digit numeric options like
> '-1', '-2'. These are legal short form options, and there are
> programs that use them. They are also somewhat common numeric
> values to include in command lines inputs.
My naive implementation would be that any dash would stop the
list of multiple values. If you want to have a value containing a
space or a dash, you enclose it with double quotes in the
> myapp --modelicalibs "fila-a.mo" "file-b.mo" --log-level info
But you are right there a corner cases to be considered.
More information about the Digitalmars-d-learn