mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-22 05:08:58 +02:00
Render command help summaries the same as option help summaries.
Option help summaries do not have initial capitals (except in special cases) and final periods so it makes sense to render the command summaries the same way. Use the same function for both so they are consistent.
This commit is contained in:
parent
eb2f279a29
commit
ed72c6f9a1
@ -404,7 +404,10 @@ helpRender(const Buffer *const helpData)
|
|||||||
strCatFmt(
|
strCatFmt(
|
||||||
result, " %s%*s%s\n", cfgParseCommandName(commandId),
|
result, " %s%*s%s\n", cfgParseCommandName(commandId),
|
||||||
(int)(commandSizeMax - strlen(cfgParseCommandName(commandId)) + 2), "",
|
(int)(commandSizeMax - strlen(cfgParseCommandName(commandId)) + 2), "",
|
||||||
strZ(helpRenderText(commandData[commandId].summary, false, false, commandSizeMax + 6, false, CONSOLE_WIDTH)));
|
strZ(
|
||||||
|
helpRenderText(
|
||||||
|
helpRenderSummary(commandData[commandId].summary), false, false, commandSizeMax + 6, false,
|
||||||
|
CONSOLE_WIDTH)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct message for more help
|
// Construct message for more help
|
||||||
|
@ -53,26 +53,26 @@ testRun(void)
|
|||||||
" pgbackrest [options] [command]\n"
|
" pgbackrest [options] [command]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Commands:\n"
|
"Commands:\n"
|
||||||
" annotate Add or modify backup annotation.\n"
|
" annotate add or modify backup annotation\n"
|
||||||
" archive-get Get a WAL segment from the archive.\n"
|
" archive-get get a WAL segment from the archive\n"
|
||||||
" archive-push Push a WAL segment to the archive.\n"
|
" archive-push push a WAL segment to the archive\n"
|
||||||
" backup Backup a database cluster.\n"
|
" backup backup a database cluster\n"
|
||||||
" check Check the configuration.\n"
|
" check check the configuration\n"
|
||||||
" expire Expire backups that exceed retention.\n"
|
" expire expire backups that exceed retention\n"
|
||||||
" help Get help.\n"
|
" help get help\n"
|
||||||
" info Retrieve information about backups.\n"
|
" info retrieve information about backups\n"
|
||||||
" repo-get Get a file from a repository.\n"
|
" repo-get get a file from a repository\n"
|
||||||
" repo-ls List files in a repository.\n"
|
" repo-ls list files in a repository\n"
|
||||||
" restore Restore a database cluster.\n"
|
" restore restore a database cluster\n"
|
||||||
" server pgBackRest server.\n"
|
" server pgBackRest server\n"
|
||||||
" server-ping Ping pgBackRest server.\n"
|
" server-ping ping pgBackRest server\n"
|
||||||
" stanza-create Create the required stanza data.\n"
|
" stanza-create create the required stanza data\n"
|
||||||
" stanza-delete Delete a stanza.\n"
|
" stanza-delete delete a stanza\n"
|
||||||
" stanza-upgrade Upgrade a stanza.\n"
|
" stanza-upgrade upgrade a stanza\n"
|
||||||
" start Allow pgBackRest processes to run.\n"
|
" start allow pgBackRest processes to run\n"
|
||||||
" stop Stop pgBackRest processes from running.\n"
|
" stop stop pgBackRest processes from running\n"
|
||||||
" verify Verify contents of the repository.\n"
|
" verify verify contents of the repository\n"
|
||||||
" version Get version.\n"
|
" version get version\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Use 'pgbackrest help [command]' for more information.\n",
|
"Use 'pgbackrest help [command]' for more information.\n",
|
||||||
helpVersion);
|
helpVersion);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user