Re: unrecognized option '--help

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: unrecognized option '--help
Дата
Msg-id 20150522015006.GF2028@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: unrecognized option '--help  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: unrecognized option '--help  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2015-05-21 21:44:36 -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Michael Paquier wrote:
> >> 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.
>
> I think the only thing that would do what you wanted would be to
> recognize *any* argv element matching "--help" as a help request.
> Maybe that's all right, but I'm a tad worried about the possibility
> of false positives.  Are we so sure that that string could never be
> a database name, table name, etc?

I'm not following. Why does checking for --help/-? in the normal
getopt_long call require that? In many, but not all, utilities only
argv[1] is checked...

Andres

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unrecognized option '--help
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unrecognized option '--help