Re: unrecognized option '--help - Mailing list pgsql-bugs

From Andres Freund
Subject Re: unrecognized option '--help
Date
Msg-id 20150522014407.GE2028@alap3.anarazel.de
Whole thread Raw
In response to Re: unrecognized option '--help  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On 2015-05-21 22:36:19 -0300, Alvaro Herrera wrote:
> Michael Paquier wrote:
> > On Thu, May 21, 2015 at 4:35 PM, D. S. <spider@skuggor.se> wrote:
> > > Explanation:
> > > If anything is ahead of --help, "--help" is then an unrecognized
> > > option.
> >
> > It is wanted this way for all the utilities of src/bin. See
> > handle_help_version_opts() in src/bin/scripts/common.c for your case.
>
> Is it really wanted?  I find it very annoying and wish it didn't do
> that.

If I understand correctly it's a relic from the time when we couldn't
rely on long options being supported. Since that's long past (we use our
own getopt in that case), we imo should just rip out all that --help/-?
specific code.

I too find it *very* annoying.

Andres

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: unrecognized option '--help
Next
From: Tom Lane
Date:
Subject: Re: unrecognized option '--help