From 1682845008cfcac36183cf7cc4f06e96904813a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 24 Mar 2026 23:44:01 +0100 Subject: [PATCH] shared/options: add OPTION_COMMON_LOWERCASE_J --- src/id128/id128.c | 3 +-- src/shared/options.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/id128/id128.c b/src/id128/id128.c index fe4d2f2283..f23403b3f8 100644 --- a/src/id128/id128.c +++ b/src/id128/id128.c @@ -259,8 +259,7 @@ static int parse_argv(int argc, char *argv[], char ***ret_args) { return r; break; - OPTION_SHORT('j', NULL, - "Equivalent to --json=pretty (on TTY) or --json=short (otherwise)"): + OPTION_COMMON_LOWERCASE_J: arg_json_format_flags = SD_JSON_FORMAT_PRETTY_AUTO|SD_JSON_FORMAT_COLOR_AUTO; break; diff --git a/src/shared/options.h b/src/shared/options.h index 6baec72b4f..7980b69448 100644 --- a/src/shared/options.h +++ b/src/shared/options.h @@ -68,6 +68,9 @@ typedef struct Option { OPTION('M', "machine", "CONTAINER", "Operate on local container") #define OPTION_COMMON_JSON \ OPTION_LONG("json", "FORMAT", "Generate JSON output (pretty, short, or off)") +#define OPTION_COMMON_LOWERCASE_J \ + OPTION_SHORT('j', NULL, \ + "Equivalent to --json=pretty (on TTY) or --json=short (otherwise)") /* This is magically mapped to the beginning and end of the section */ extern const Option __start_SYSTEMD_OPTIONS[];