[Issue 21045] New: std.getopt: Support blank as separator of multiple values

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 15 07:11:47 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21045

          Issue ID: 21045
           Summary: std.getopt: Support blank as separator of multiple
                    values
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: andre at s-e-a-p.de

I need to simulate an application written in C / C++ which supports passing
multiple argument values separated by space:

dmd -run sample.d --modelicalibs a b

``` d
import std;

void main(string[] args)
{
    string[] modelicaLibs;
    getopt(args, "modelicalibs", &modelicaLibs);
    assert(modelicaLibs == ["a", "b"]);
}
```

As of today this is not supported by std.getopt. Could this be implemented?

References:
https://forum.dlang.org/post/nafdmeyxcqythfcbdomu@forum.dlang.org
https://github.com/dlang/phobos/pull/7557

--


More information about the Digitalmars-d-bugs mailing list