]> git.ipfire.org Git - thirdparty/systemd.git/commit
help-util: add helpers for generating uniform --help texts
authorLennart Poettering <lennart@amutable.com>
Thu, 23 Apr 2026 22:09:00 +0000 (00:09 +0200)
committerLennart Poettering <lennart@amutable.com>
Fri, 24 Apr 2026 13:04:16 +0000 (15:04 +0200)
commitbbf197cda643bb371adbb79dab7f1db265647c4a
tree85d01503f244edf7e30adc332198203b3f4efd17
parenta95b55057156b3150a3ef2a3e3f170e2ad59deaa
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.
src/shared/help-util.c [new file with mode: 0644]
src/shared/help-util.h [new file with mode: 0644]
src/shared/meson.build