On Fri, Sep 19, 2025 at 11:17:14AM -0400, Chet Ramey wrote: > On 9/19/25 10:13 AM, Andreas Kähäri wrote: > > > > No, the fact that they output help text is because "--help" was asked for, > > > and they do support "--help". > > > > Support? I would expect that to be documented. If a utility does not > > document an option, how can I be sure what would happen if I used it? > > So maybe something like > > "All builtins, with the exception of `:', `echo', and `[/test', accept > --help as a special option. If --help is supplied, the builtins output > a help message and exit with a status of 2."
That would make it clear. > > > Should I somehow *assume* that "--help" is supported? > You can in the case we're discussing, but only because bash is a GNU > program and `--help' is part of the GNU coding standards. Hmm... and the GNU coding standards says to exit with a zero exit status... which is what pourko wanted. But with the added documentation (above), that does not matter, because you've now documented the deviation from them. And you don't implement "--version" anyway. -- Matti Andreas Kähäri Uppsala, Sweden .