Bug 21045 – std.getopt: Support blank as separator of multiple values

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-07-15T07:11:47Z
Last change time
2024-12-01T16:37:17Z
Assigned to
No Owner
Creator
Andre
Moved to GitHub: phobos#9802 →

Comments

Comment #0 by andre — 2020-07-15T07:11:47Z
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/[email protected] https://github.com/dlang/phobos/pull/7557
Comment #1 by robert.schadek — 2024-12-01T16:37:17Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9802 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB