[Issue 13315] New: std.getopt: implicit help option doesn't work without config.passThrough
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Aug 17 15:10:33 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13315
Issue ID: 13315
Summary: std.getopt: implicit help option doesn't work without
config.passThrough
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: nilsbossung at googlemail.com
---
cat > test.d << code
import std.getopt;
void main()
{
string[] args = ["program", "--help"];
auto r = getopt(args);
assert(r.helpWanted);
}
code
dmd test.d
./test
---
std.getopt.GetOptException@/home/nils/d/dmd/dmd2/linux/bin64/../../src/phobos/std/getopt.d(597):
Unrecognized option --help
---
The documentation doesn't say that the implicit help option only works with
config.passThrough. The examples that use helpWanted don't use
config.passThrough.
Pull request is on the way.
--
More information about the Digitalmars-d-bugs
mailing list