diff mbox series

[libgpiod,v3,08/16] dbus: client: tweak help text

Message ID 20250206-improve-docs-v3-8-2065191fff6f@linaro.org
State New
Headers show
Series doc: improvements for ReadTheDocs | expand

Commit Message

Bartosz Golaszewski Feb. 6, 2025, 12:22 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

help2man struggles to generate correct output with current help-text for
the sub-commands section. It doesn't break the lines correctly and the
resulting .rst generated with pandoc looks just as bad. Tweak the output
a bit to generate better man pages with correctly broken lines.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 dbus/client/gpiocli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/dbus/client/gpiocli.c b/dbus/client/gpiocli.c
index e9ab380..26d641b 100644
--- a/dbus/client/gpiocli.c
+++ b/dbus/client/gpiocli.c
@@ -107,7 +107,7 @@  static gchar *make_description(void)
 	const GPIOCliCmd *cmd;
 
 	for (cmd = &cli_cmds[0]; cmd->name; cmd++)
-		g_string_append_printf(descr, "  %s - %s\n",
+		g_string_append_printf(descr, "  - %s:\n\t%s\n",
 				       cmd->name, cmd->descr);
 
 	g_string_truncate(descr, descr->len - 1);