This seems like something which needs to be straightforward, and yet I've spent a good amount of time getting nowhere.

How does one get the usage information which getopt embeds in a result, and spit it out to stderr? The internals show some help output, hard-coded to stdout. As any Posix CLI coder knows, that's _not_ where you want error/help output to be forced. I tried variations of:

```d
    (GetoptResult rslt)
    defaultGetoptFormatter!File(stderr, progname, rslt.options);
```

with no success. Is there really not a rslt.helpString() or somesuch?

Thanks,
Andy

p.s. Ironically, I could probably have coded a getopt in less time than I've spent on std.getopt....

  • getopt usage hel... Andy Valencia via Digitalmars-d-learn

Reply via email to