diff options
Diffstat (limited to 'src/analyze')
-rw-r--r-- | src/analyze/analyze-cat-config.c | 2 | ||||
-rw-r--r-- | src/analyze/analyze.c | 8 | ||||
-rw-r--r-- | src/analyze/analyze.h | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/analyze/analyze-cat-config.c b/src/analyze/analyze-cat-config.c index 08184cedfe..66bbbc1102 100644 --- a/src/analyze/analyze-cat-config.c +++ b/src/analyze/analyze-cat-config.c @@ -35,7 +35,7 @@ int verb_cat_config(int argc, char *argv[], void *userdata) { } else t = *arg; - r = conf_files_cat(arg_root, t); + r = conf_files_cat(arg_root, t, arg_cat_flags); if (r < 0) return r; } diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index b7c852a08c..1b96e8b69a 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -91,6 +91,7 @@ DotMode arg_dot = DEP_ALL; char **arg_dot_from_patterns = NULL, **arg_dot_to_patterns = NULL; usec_t arg_fuzz = 0; PagerFlags arg_pager_flags = 0; +CatFlags arg_cat_flags = 0; BusTransport arg_transport = BUS_TRANSPORT_LOCAL; const char *arg_host = NULL; RuntimeScope arg_runtime_scope = RUNTIME_SCOPE_SYSTEM; @@ -270,6 +271,7 @@ static int help(int argc, char *argv[], void *userdata) { " -h --help Show this help\n" " --version Show package version\n" " -q --quiet Do not emit hints\n" + " --tldr Skip comments and empty lines\n" " --root=PATH Operate on an alternate filesystem root\n" " --image=PATH Operate on disk image as filesystem root\n" " --image-policy=POLICY Specify disk image dissection policy\n" @@ -313,6 +315,7 @@ static int parse_argv(int argc, char *argv[]) { ARG_PROFILE, ARG_TABLE, ARG_NO_LEGEND, + ARG_TLDR, }; static const struct option options[] = { @@ -346,6 +349,7 @@ static int parse_argv(int argc, char *argv[]) { { "profile", required_argument, NULL, ARG_PROFILE }, { "table", optional_argument, NULL, ARG_TABLE }, { "no-legend", optional_argument, NULL, ARG_NO_LEGEND }, + { "tldr", no_argument, NULL, ARG_TLDR }, {} }; @@ -535,6 +539,10 @@ static int parse_argv(int argc, char *argv[]) { arg_legend = false; break; + case ARG_TLDR: + arg_cat_flags = CAT_TLDR; + break; + case '?': return -EINVAL; diff --git a/src/analyze/analyze.h b/src/analyze/analyze.h index 84575cd9a9..8a9528c0d3 100644 --- a/src/analyze/analyze.h +++ b/src/analyze/analyze.h @@ -7,6 +7,7 @@ #include "bus-util.h" #include "json.h" #include "pager.h" +#include "pretty-print.h" #include "time-util.h" #include "unit-file.h" @@ -20,6 +21,7 @@ extern DotMode arg_dot; extern char **arg_dot_from_patterns, **arg_dot_to_patterns; extern usec_t arg_fuzz; extern PagerFlags arg_pager_flags; +extern CatFlags arg_cat_flags; extern BusTransport arg_transport; extern const char *arg_host; extern RuntimeScope arg_runtime_scope; |