Re: unrecognized option '--help

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "D(dot) S(dot)" <spider(at)skuggor(dot)se>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: unrecognized option '--help
Date: 2015-05-22 01:44:07
Message-ID: 20150522014407.GE2028@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)skuggor(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-05-22 01:44:36 Re: unrecognized option '--help
Previous Message Alvaro Herrera 2015-05-22 01:36:19 Re: unrecognized option '--help