1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-04 03:49:14 +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:
David Steele 2024-10-11 12:05:23 +03:00
parent eb2f279a29
commit ed72c6f9a1
2 changed files with 24 additions and 21 deletions

View File

@ -404,7 +404,10 @@ helpRender(const Buffer *const helpData)
strCatFmt(
result, " %s%*s%s\n", cfgParseCommandName(commandId),
(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

View File

@ -53,26 +53,26 @@ testRun(void)
" pgbackrest [options] [command]\n"
"\n"
"Commands:\n"
" annotate Add or modify backup annotation.\n"
" archive-get Get a WAL segment from the archive.\n"
" archive-push Push a WAL segment to the archive.\n"
" backup Backup a database cluster.\n"
" check Check the configuration.\n"
" expire Expire backups that exceed retention.\n"
" help Get help.\n"
" info Retrieve information about backups.\n"
" repo-get Get a file from a repository.\n"
" repo-ls List files in a repository.\n"
" restore Restore a database cluster.\n"
" server pgBackRest server.\n"
" server-ping Ping pgBackRest server.\n"
" stanza-create Create the required stanza data.\n"
" stanza-delete Delete a stanza.\n"
" stanza-upgrade Upgrade a stanza.\n"
" start Allow pgBackRest processes to run.\n"
" stop Stop pgBackRest processes from running.\n"
" verify Verify contents of the repository.\n"
" version Get version.\n"
" annotate add or modify backup annotation\n"
" archive-get get a WAL segment from the archive\n"
" archive-push push a WAL segment to the archive\n"
" backup backup a database cluster\n"
" check check the configuration\n"
" expire expire backups that exceed retention\n"
" help get help\n"
" info retrieve information about backups\n"
" repo-get get a file from a repository\n"
" repo-ls list files in a repository\n"
" restore restore a database cluster\n"
" server pgBackRest server\n"
" server-ping ping pgBackRest server\n"
" stanza-create create the required stanza data\n"
" stanza-delete delete a stanza\n"
" stanza-upgrade upgrade a stanza\n"
" start allow pgBackRest processes to run\n"
" stop stop pgBackRest processes from running\n"
" verify verify contents of the repository\n"
" version get version\n"
"\n"
"Use 'pgbackrest help [command]' for more information.\n",
helpVersion);