On Fri, 19 Sep 2025 10:29:05 -0400 Chet Ramey wrote:
> On 9/19/25 9:55 AM, pourko wrote:
> > Not *some*, they all return error code 2.
> > And, I don't see anything "invalid" about --help.

> So this is the bug report? That the builtins that accept --help (some
> builtins are documented as not accepting any options) do not return 0?

No, it most certainly is not. It was Andreas Kähäri who brought things like
"invalid" options, and "documentation". I was replying to him.

> > Then maybe they should. Both /bin/[ and /bin/echo support "--help".
> This is a bad idea, and certainly not universal.

I agree, this is a bad idea. Again, I was replying to Andreas, who was playing 
"devil's advocate".

To rephrase my original posting: Commands that do support "--help", they usually
exit with return code 0. Wouldn't it be more reasonable if our builtins behaved
the same way?

Pourko


  • builtin_name --he... pourko--- via Bug reports for the GNU Bourne Again SHell
    • Re: builtin_... Andreas Kähäri
      • Re: buil... pourko--- via Bug reports for the GNU Bourne Again SHell
        • Re: ... Chet Ramey
          • ... pourko--- via Bug reports for the GNU Bourne Again SHell
            • ... Chet Ramey
              • ... pourko--- via Bug reports for the GNU Bourne Again SHell
                • ... Chet Ramey
                • ... pourko--- via Bug reports for the GNU Bourne Again SHell
                • ... Chet Ramey
                • ... Andreas Kähäri
        • Re: ... Andreas Kähäri
          • ... Chet Ramey
            • ... Andreas Kähäri
              • ... Chet Ramey

Reply via email to