[Bug 291092] beep(1) options in wrong order, min/max not stated

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 21 Nov 2025 18:21:27 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291092

--- Comment #4 from B.S. <bigsneaky@duck.com> ---
Re whether the usage message is redundant to the man page: it has a different
role. The usage message is printed to stderr after an impermissible input (e.g.
duration below min or above max).

For comparison, ministat(1) has an extensive usage message but it only appears
after an erroneous input (no `-h` flag to invoke it deliberately). Nicely, this
is accompanied by a statement of what triggered the error: `ministat -c 71`
reports "No support for confidence level", then the usage message. This would
be nice to have on beep(1) too, but wasn't part of my Problem Report. See:

https://man.freebsd.org/cgi/man.cgi?ministat

https://github.com/freebsd/freebsd-src/blob/main/usr.bin/ministat/ministat.c

Arguably, when deliberately invoked by `beep -h`, perhaps the usage message
should be printed to stdout instead of stderr, but practice on that is not
universal and I don't know what the norm is in FreeBSD. See e.g.

https://stackoverflow.com/questions/2199624/should-the-command-line-usage-be-printed-on-stdout-or-stderr

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