Bug 17945 – defaultGetoptPrinter prints options with multiple names wrong

Status
NEW
Severity
trivial
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-10-28T16:02:06Z
Last change time
2024-12-01T16:31:02Z
Assigned to
No Owner
Creator
JR
Moved to GitHub: phobos#9723 →

Comments

Comment #0 by zorael — 2017-10-28T16:02:06Z
import std.getopt; void main(string[] args) { bool verbose; auto helpInformation = std.getopt.getopt(args, "verbose|loquacious|garrulous", "(description)", &verbose); // from the doc example defaultGetoptPrinter("asdf", helpInformation.options); } The displayed help line for &verbose is: -verbose --loquacious (description) -verbose is wrong as it should have two dashes. std.getopt.GetOptException@/usr/include/dlang/dmd/std/getopt.d(789): Unrecognized option -verbose --garrulous is properly accepted but missing from the help page.
Comment #1 by robert.schadek — 2024-12-01T16:31:02Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9723 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB