mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add new psql help topics, accessible to both --help and \?.
Add --help=<topic> for the commandline, and \? <topic> as a backslash command, to show more help than the invocations without parameters do. "commands", "variables" and "options" currently exist as help topics describing, respectively, backslash commands, psql variables, and commandline switches. Without parameters the help commands show their previous topic. Some further wordsmithing or extending of the added help content might be needed; but there seems little benefit delaying the overall feature further. Author: Pavel Stehule, editorialized by many Reviewed-By: Andres Freund, Petr Jelinek, Fujii Masao, MauMau, Abhijit Menon-Sen and Erik Rijkers. Discussion: CAFj8pRDVGuC-nXBfe2CK8vpyzd2Dsr9GVpbrATAnZO=2YQ0s2Q@mail.gmail.com, CAFj8pRA54AbTv2RXDTRxiAd8hy8wxmoVLqhJDRCwEnhdd7OUkw@mail.gmail.com
This commit is contained in:
@ -560,11 +560,17 @@ EOF
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-?</></term>
|
||||
<term><option>--help</></term>
|
||||
<term><option>--help[=<replaceable class="parameter">topic</>]</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Show help about <application>psql</application> command line
|
||||
arguments, and exit.
|
||||
Show help about <application>psql</application> and exit. The optional
|
||||
<replaceable class="parameter">topic</> parameter (defaulting
|
||||
to <literal>options</literal>) selects which part of psql is
|
||||
explained: <literal>commands</> describes <application>psql</>'s
|
||||
backslash commands; <literal>options</> describes the commandline
|
||||
switches that can be passed to <application>psql</>;
|
||||
and <literal>variables</> shows help about about psql configuration
|
||||
variables.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -2574,10 +2580,17 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>\?</literal></term>
|
||||
<term><literal>\? [ <replaceable class="parameter">topic</> ]</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Shows help information about the backslash commands.
|
||||
Shows help information. The optional
|
||||
<replaceable class="parameter">topic</> parameter
|
||||
(defaulting to <literal>commands</>) selects which part of psql is
|
||||
explained: <literal>commands</> describes <application>psql</>'s
|
||||
backslash commands; <literal>options</> describes the commandline
|
||||
switches that can be passed to <application>psql</>;
|
||||
and <literal>variables</> shows help about about psql configuration
|
||||
variables.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
Reference in New Issue
Block a user