[Issue 2714] New: std.getopt erroneously splits arguments
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 6 15:57:41 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2714
Summary: std.getopt erroneously splits arguments
Product: D
Version: 2.025
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: andrei at metalanguage.com
ReportedBy: dhasenan at gmail.com
When you try:
rdmd --eval='printf("Hello world\n");'
You get an error. rdmd tried compiling the string 'printf("Hello'.
Looking into this further, std.getopt explicitly ignores shell escaping.
There's no way to pass in an argument with spaces using std.getopt.
The fix is to eliminate lines 312 to 327 inclusive in std/getopt.d, and rely on
the shell to split the arguments properly.
--
More information about the Digitalmars-d-bugs
mailing list