options: add common option macros for --no-ask-password, --host, --machine

Co-developed-by: Claude <claude@anthropic.com>
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-03-26 10:31:23 +01:00
parent b59daaa4cf
commit 1e1143aba0
+6
View File
@@ -60,6 +60,12 @@ typedef struct Option {
OPTION_LONG("cat-config", NULL, "Show configuration files")
#define OPTION_COMMON_TLDR \
OPTION_LONG("tldr", NULL, "Show non-comment parts of configuration")
#define OPTION_COMMON_NO_ASK_PASSWORD \
OPTION_LONG("no-ask-password", NULL, "Do not prompt for password")
#define OPTION_COMMON_HOST \
OPTION('H', "host", "[USER@]HOST", "Operate on remote host")
#define OPTION_COMMON_MACHINE \
OPTION('M', "machine", "CONTAINER", "Operate on local container")
#define OPTION_COMMON_JSON \
OPTION_LONG("json", "FORMAT", "Generate JSON output (pretty, short, or off)")