Skip to content

Commit 44093f0

Browse files
committed
lightning-cli: use human_readable for help messages (unescapes \n for us).
Signed-off-by: Rusty Russell <[email protected]> Changelog-Changed: lightning-cli: `help` messages using new-lines is now printed properly, enhancing readability and consistency.
1 parent ca0c9e6 commit 44093f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/lightning-cli.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ static void human_help(char *buffer, const jsmntok_t *result)
197197
for (i = 0; i < tal_count(help); i++) {
198198
const jsmntok_t *command;
199199
command = json_get_member(buffer, help[i], "command");
200-
printf("%.*s\n\n",
201-
command->end - command->start, buffer + command->start);
200+
human_readable(buffer, command, '\n');
201+
printf("\n");
202202
}
203203
tal_free(help);
204204

0 commit comments

Comments
 (0)