On Fri, 19 Sep 2025 11:09:49 -0400 Chet Ramey wrote:
> > On 9/19/25 11:06 AM, Lawrence Velázquez wrote:
> > For what it's worth, those standards do imply that the exit status
> > should be zero.
> >
> > The standard `--help' option should output brief
> > documentation for how to invoke the program, on
> > standard output, then exit successfully.
>
> Yes, that is one of the reports here. The other is that --help isn't
> documented as being a valid option for the builtins that accept it.
I would really rather not talk about documentation here. If someone feels
that documentation is an issue, then maybe they should start a new thread.
I see that for builtins that do recognize --help as a valid option,
you have defined this macro:
#define CASE_HELPOPT \
case GETOPT_HELP: \
builtin_help (); \
return (EX_USAGE)
I believe that it maybe more appropriate if you return 0 from there.
That would solve it for *all* builtins that support the --help option.
Pourko