Skip to content

Commit b683b82

Browse files
committed
busctl: introduce --full command line option
1 parent 6c64cf8 commit b683b82

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

man/busctl.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,15 @@
388388
<xi:include href="user-system-options.xml" xpointer="host" />
389389
<xi:include href="user-system-options.xml" xpointer="machine" />
390390

391+
<varlistentry>
392+
<term><option>-l</option></term>
393+
<term><option>--full</option></term>
394+
395+
<listitem>
396+
<para>Do not ellipsize the output in <command>list</command> command.</para>
397+
</listitem>
398+
</varlistentry>
399+
391400
<xi:include href="standard-options.xml" xpointer="no-pager" />
392401
<xi:include href="standard-options.xml" xpointer="no-legend" />
393402
<xi:include href="standard-options.xml" xpointer="help" />

src/busctl/busctl.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ static enum {
3838
} arg_json = JSON_OFF;
3939
static PagerFlags arg_pager_flags = 0;
4040
static bool arg_legend = true;
41+
static bool arg_full = false;
4142
static const char *arg_address = NULL;
4243
static bool arg_unique = false;
4344
static bool arg_acquired = false;
@@ -195,6 +196,9 @@ static int list_bus_names(int argc, char **argv, void *userdata) {
195196
if (!table)
196197
return log_oom();
197198

199+
if (arg_full)
200+
table_set_width(table, 0);
201+
198202
r = table_set_align_percent(table, table_get_cell(table, 0, COLUMN_PID), 100);
199203
if (r < 0)
200204
return log_error_errno(r, "Failed to set alignment: %m");
@@ -2251,6 +2255,7 @@ static int help(void) {
22512255
" --version Show package version\n"
22522256
" --no-pager Do not pipe output into a pager\n"
22532257
" --no-legend Do not show the headers and footers\n"
2258+
" -l --full Do not ellipsize output\n"
22542259
" --system Connect to system bus\n"
22552260
" --user Connect to user bus\n"
22562261
" -H --host=[USER@]HOST Operate on remote host\n"
@@ -2323,6 +2328,7 @@ static int parse_argv(int argc, char *argv[]) {
23232328
{ "version", no_argument, NULL, ARG_VERSION },
23242329
{ "no-pager", no_argument, NULL, ARG_NO_PAGER },
23252330
{ "no-legend", no_argument, NULL, ARG_NO_LEGEND },
2331+
{ "full", no_argument, NULL, 'l' },
23262332
{ "system", no_argument, NULL, ARG_SYSTEM },
23272333
{ "user", no_argument, NULL, ARG_USER },
23282334
{ "address", required_argument, NULL, ARG_ADDRESS },
@@ -2372,6 +2378,10 @@ static int parse_argv(int argc, char *argv[]) {
23722378
arg_legend = false;
23732379
break;
23742380

2381+
case 'l':
2382+
arg_full = true;
2383+
break;
2384+
23752385
case ARG_USER:
23762386
arg_user = true;
23772387
break;

0 commit comments

Comments
 (0)