Files
s390-tools/zmemtopo/zmemtopo_cli.h
Szabina Korbai b444e71ee3 zmemtopo: Implement zsh and bash autocompletion
Add generation of shell autocompletion scripts.

Acked-by: Steffen Eiden <seiden@linux.ibm.com>
Tested-by: Mete Durlu <meted@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Szabina Korbai <szkorbai@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2026-04-30 08:50:10 +02:00

50 lines
1.2 KiB
C

/*
* SPDX-License-Identifier: MIT
*
* Copyright IBM Corp.
*/
#ifndef ZMEMTOPO_CLI_H
#define ZMEMTOPO_CLI_H
#include "lib/util_fmt.h"
#include "lib/util_opt.h"
#define OPT_FORMAT 256
static struct util_opt opt_vec[] = {
UTIL_OPT_SECTION("OUTPUT FORMAT OPTIONS"),
{
.option = { "level", required_argument, NULL, 'l' },
.argument = "NESTING_LEVEL",
.desc = "Set the topology display depth to NESTING_LEVEL"
}, {
.option = { "format", required_argument, NULL, OPT_FORMAT },
.argument = "FORMAT",
.flags = UTIL_OPT_FLAG_NOSHORT,
.desc = "List data in specified FORMAT (" FMT_TYPE_NAMES ")",
}, {
.option = { "full", no_argument, NULL, 'f' },
.desc = "Display tree view with padded elements"
}, {
.option = { "reverse", no_argument, NULL, 'r' },
.desc = "Reverse tree view hierarchy direction"
}, {
.option = { "table", no_argument, NULL, 't' },
.desc = "Use table view to display topology"
}, {
.option = { "sort", required_argument, NULL, 's' },
.argument = "FIELD",
.desc = "Sort view by FIELD (nr, lpar, size)"
}, {
.option = { "ascii", no_argument, NULL, 'i' },
.desc = "Use only ASCII characters",
},
UTIL_OPT_SECTION("GENERAL OPTIONS"),
UTIL_OPT_HELP,
UTIL_OPT_VERSION,
UTIL_OPT_END
};
#endif