]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
busctl: introduce --full command line option
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 Jan 2020 03:19:47 +0000 (12:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 Jan 2020 03:19:47 +0000 (12:19 +0900)
man/busctl.xml
src/busctl/busctl.c

index 2f7eb999514cac0357d1dd7a1680350406ec322f..eebc42105d3fa27a381954e5595977cabdbb959c 100644 (file)
       <xi:include href="user-system-options.xml" xpointer="host" />
       <xi:include href="user-system-options.xml" xpointer="machine" />
 
+      <varlistentry>
+        <term><option>-l</option></term>
+        <term><option>--full</option></term>
+
+        <listitem>
+          <para>Do not ellipsize the output in <command>list</command> command.</para>
+        </listitem>
+      </varlistentry>
+
       <xi:include href="standard-options.xml" xpointer="no-pager" />
       <xi:include href="standard-options.xml" xpointer="no-legend" />
       <xi:include href="standard-options.xml" xpointer="help" />
index 878837eb7e12a3571da4f0050778b08e02828e13..aec323749caa63e1c966585fc18a68a39af36665 100644 (file)
@@ -38,6 +38,7 @@ static enum {
 } arg_json = JSON_OFF;
 static PagerFlags arg_pager_flags = 0;
 static bool arg_legend = true;
+static bool arg_full = false;
 static const char *arg_address = NULL;
 static bool arg_unique = false;
 static bool arg_acquired = false;
@@ -195,6 +196,9 @@ static int list_bus_names(int argc, char **argv, void *userdata) {
         if (!table)
                 return log_oom();
 
+        if (arg_full)
+                table_set_width(table, 0);
+
         r = table_set_align_percent(table, table_get_cell(table, 0, COLUMN_PID), 100);
         if (r < 0)
                 return log_error_errno(r, "Failed to set alignment: %m");
@@ -2251,6 +2255,7 @@ static int help(void) {
                "     --version             Show package version\n"
                "     --no-pager            Do not pipe output into a pager\n"
                "     --no-legend           Do not show the headers and footers\n"
+               "  -l --full                Do not ellipsize output\n"
                "     --system              Connect to system bus\n"
                "     --user                Connect to user bus\n"
                "  -H --host=[USER@]HOST    Operate on remote host\n"
@@ -2323,6 +2328,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "version",                         no_argument,       NULL, ARG_VERSION                         },
                 { "no-pager",                        no_argument,       NULL, ARG_NO_PAGER                        },
                 { "no-legend",                       no_argument,       NULL, ARG_NO_LEGEND                       },
+                { "full",                            no_argument,       NULL, 'l'                                 },
                 { "system",                          no_argument,       NULL, ARG_SYSTEM                          },
                 { "user",                            no_argument,       NULL, ARG_USER                            },
                 { "address",                         required_argument, NULL, ARG_ADDRESS                         },
@@ -2372,6 +2378,10 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_legend = false;
                         break;
 
+                case 'l':
+                        arg_full = true;
+                        break;
+
                 case ARG_USER:
                         arg_user = true;
                         break;