On 10/10/2017 07:06 PM, Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>> I have been annoyed at least twice now by the lack of pg_regress command
>> line help output for the "--bindir=<path>" option. In passing I noted
>> that there was no output for "--help" or "--version" options either.
>
>> Any objections to the attached?
>
> +1 for documenting it, but the phrasing seems a bit awkward:
>
> ! printf(_(" --bindir=BINPATH use BINPATH for programs that are run;\n"));
> ! printf(_(" if BINPATH empty, use PATH from the environment\n"));
>
> Maybe just "if empty, use PATH ..." ?
Ok, so like this?
8<----------
--bindir=BINPATH use BINPATH for programs that are run;\n")); if empty, use PATH from the
environment\n"));
8<----------
> Also, why is the patch apparently changing whitespace in all the help
> lines? Seems like that will create a lot of make-work for translators.
I debated with myself about that.
In other cases, e.g. initdb or psql, where we mix short+long options and
long-only options, we indent the long-only options in the output to
match up with the long-options of the mixed lines (whew, hopefully that
is clear).
Previously we were not showing mixed short+long options for pg_regress
at all, and hence only indenting the long-only options minimally. But
the addition of -h and -V (again consistent with other programs we
ship), it made sense to be consistent in the way we indent.
But I am fine with leaving the original lines output the way they were
if preferred.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development