Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Mar 2024 11:55:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 272260] bectl(8) usage: -?
Message-ID:  <bug-272260-9-Rzxgxk8PUo@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-272260-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-272260-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272260

Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |des@FreeBSD.org

--- Comment #11 from Dag-Erling Sm=C3=B8rgrav <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 =E2=80=9C`-?` is the standard way to reques=
t a usage
message=E2=80=9D, 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.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272260-9-Rzxgxk8PUo>