help-util: add helpers for generating uniform --help texts

Let's introduce some helpers for generating uniform --help texts with
some minimal ANSI styling.

This shortens the help() functions generally, and allows us to change
the style at a single, central place.

This mostly just follows our current styling for --help, but it makes
two updates to it:

1. The command line summary at the very top of the --help text is now
   prefixes with a grey ">" character to indicate it's a command line.

2. The human language introductionary description/abstract right after
   that command line is set in italics, to emphasize it's not dry,
   technical, structural information, but more human friendly prose.
This commit is contained in:
Lennart Poettering
2026-04-24 15:04:16 +02:00
parent a95b550571
commit bbf197cda6
3 changed files with 78 additions and 0 deletions
+1
View File
@@ -94,6 +94,7 @@ shared_sources = files(
'gnutls-util.c',
'gpt.c',
'group-record.c',
'help-util.c',
'hibernate-util.c',
'hostname-setup.c',
'hwdb-util.c',