summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-09-12 16:44:52 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-09-14 22:32:20 +0200
commit4f9791a36caf27f9adb5a6d6490a703e408ca3dc (patch)
tree6767016672063625b8e66d6969d0e8e8042d6d8a
parentRevert "mkosi: pin CentOS9 kernel to working version" (diff)
downloadsystemd-4f9791a36caf27f9adb5a6d6490a703e408ca3dc.tar.xz
systemd-4f9791a36caf27f9adb5a6d6490a703e408ca3dc.zip
export: use highlighting in --help
-rw-r--r--src/import/export.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/import/export.c b/src/import/export.c
index 84609cbe12..7e941a29af 100644
--- a/src/import/export.c
+++ b/src/import/export.c
@@ -18,6 +18,7 @@
#include "main-func.h"
#include "signal-util.h"
#include "string-util.h"
+#include "terminal-util.h"
#include "verbs.h"
static ImportCompressType arg_compress = IMPORT_COMPRESS_UNKNOWN;
@@ -201,16 +202,20 @@ static int export_raw(int argc, char *argv[], void *userdata) {
}
static int help(int argc, char *argv[], void *userdata) {
-
- printf("%s [OPTIONS...] {COMMAND} ...\n\n"
- "Export container or virtual machine images.\n\n"
+ printf("%1$s [OPTIONS...] {COMMAND} ...\n"
+ "\n%4$sExport container or virtual machine images.%5$s\n"
+ "\n%2$sCommands:%3$s\n"
+ " tar NAME [FILE] Export a TAR image\n"
+ " raw NAME [FILE] Export a RAW image\n"
+ "\n%2$sOptions:%3$s\n"
" -h --help Show this help\n"
" --version Show package version\n"
- " --format=FORMAT Select format\n\n"
- "Commands:\n"
- " tar NAME [FILE] Export a TAR image\n"
- " raw NAME [FILE] Export a RAW image\n",
- program_invocation_short_name);
+ " --format=FORMAT Select format\n\n",
+ program_invocation_short_name,
+ ansi_underline(),
+ ansi_normal(),
+ ansi_highlight(),
+ ansi_normal());
return 0;
}