From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
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 02:08:42 |
Message-ID: | 20931.1432260522@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> If you have a database called --help you should probably still be able
> to connect to it using any of:
> psql --dbname=--help
> psql -d --help
> psql -- --help
> I think it's perfectly reasonable to not recognize --help when it can be
> considered an argument to the previous option.
But then you have the problem that --help will only work if you spelled
everything to its left correctly, or at least close enough that getopt
doesn't see a problem with it.
I did have an evil thought about this ... what about recognizing --help
as either the first or last argument, but not in between? That would
fix Alvaro's use-case, and for the 0.01% of cases where it's problematic,
I suspect it's always possible to rearrange the command so that the --help
argument doesn't have to be last.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-05-22 02:13:19 | Re: unrecognized option '--help |
Previous Message | Tom Lane | 2015-05-22 01:59:56 | Re: unrecognized option '--help |