[Bug 272260] bectl(8) usage: -?
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 272260] bectl(8) usage: -?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 18 Mar 2024 11:55:09 UTC
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.