Date: Mon, 18 Mar 2024 11:55:09 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272260] bectl(8) usage: -? Message-ID: <bug-272260-227-0s9W3SsOiD@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-272260-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272260 Dag-Erling Smørgrav <des@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |des@FreeBSD.org --- Comment #11 from Dag-Erling Smørgrav <des@FreeBSD.org> --- Because `getopt(3)` returns `?` when it encounters an error, and the usual way to handle said error is to print a usage message and exit, `-?` can usually be relied upon to produce a usage message even if the author of the utility did not think to provide a `-h` option for that purpose. Some people have improperly internalized this as “`-?` is the standard way to request a usage message”, which is not the case. The author of `bectl(8)` appears to be one of those people, and hardcoded a check for `-?` in `bectl(8)`'s non-standard command line parser. My recommendation is to rewrite `bectl(8)` to use `getopt(3)` and remove all mention of `-?` from the usage string and manual page. -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272260-227-0s9W3SsOiD>
