refactor(console): Enable astyle formatting

This commit is contained in:
Peter Marcisovsky
2024-04-29 16:12:51 +02:00
parent fe3fd4ae43
commit 0bfaf775c1
8 changed files with 36 additions and 37 deletions

View File

@@ -250,22 +250,22 @@ static struct {
static void print_arg_help(cmd_item_t *it)
{
/* First line: command name and hint
* Pad all the hints to the same column
*/
const char *hint = (it->hint) ? it->hint : "";
printf("%-s %s\n", it->command, hint);
/* Second line: print help.
* Argtable has a nice helper function for this which does line
* wrapping.
*/
printf(" "); // arg_print_formatted does not indent the first line
arg_print_formatted(stdout, 2, 78, it->help);
/* Finally, print the list of arguments */
if (it->argtable) {
arg_print_glossary(stdout, (void **) it->argtable, " %12s %s\n");
}
printf("\n");
/* First line: command name and hint
* Pad all the hints to the same column
*/
const char *hint = (it->hint) ? it->hint : "";
printf("%-s %s\n", it->command, hint);
/* Second line: print help.
* Argtable has a nice helper function for this which does line
* wrapping.
*/
printf(" "); // arg_print_formatted does not indent the first line
arg_print_formatted(stdout, 2, 78, it->help);
/* Finally, print the list of arguments */
if (it->argtable) {
arg_print_glossary(stdout, (void **) it->argtable, " %12s %s\n");
}
printf("\n");
}
static int help_command(int argc, char **argv)
@@ -322,7 +322,7 @@ esp_err_t esp_console_register_help_command(void)
esp_console_cmd_t command = {
.command = "help",
.help = "Print the summary of all registered commands if no arguments "
"are given, otherwise print summary of given command.",
"are given, otherwise print summary of given command.",
.func = &help_command,
.argtable = &help_args
};