<xi:include href="standard-options.xml" xpointer="no-pager" />
<xi:include href="standard-options.xml" xpointer="json" />
+ <xi:include href="standard-options.xml" xpointer="j" />
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
</variablelist>
" --system Connect to system service manager (default)\n"
" --json=pretty|short\n"
" Configure JSON output\n"
+ " -j Equivalent to --json=pretty (on TTY) or --json=short\n"
+ " (otherwise)\n"
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
+ while ((c = getopt_long(argc, argv, "hj", options, NULL)) >= 0)
switch (c) {
case 'h':
return verb_help(/* argc= */ 0, /* argv= */ NULL, /* userdata= */ NULL);
break;
+ case 'j':
+ arg_json_format_flags = SD_JSON_FORMAT_PRETTY_AUTO|SD_JSON_FORMAT_COLOR_AUTO;
+ break;
+
case '?':
return -EINVAL;