diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-17 07:35:08 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-17 17:20:58 +0200 |
commit | 92a1fd9e95954a557d6fe27b56f5ef1b89fc2f5e (patch) | |
tree | 58cce02cda2c254c7c7cfa54f98213d1a33ce04d /src/shared/logs-show.c | |
parent | 085d71209ba32c1e4e72ec031536be892054352e (diff) |
journalctl: do not ellipsize when using pager
If a pager is used, ellipsization is redundant — the pager does
that better by hiding the part that cannot be shown. Pager's advantage
is that the user can press → to view the hidden part of a message,
and then ← to return.
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r-- | src/shared/logs-show.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index bbfb74c2bd..43e42f7880 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -225,7 +225,8 @@ static int output_short(sd_journal *j, unsigned line, unsigned n_columns, else if (!utf8_is_printable_n(message, message_len)) { char bytes[FORMAT_BYTES_MAX]; printf(": [%s blob data]\n", format_bytes(bytes, sizeof(bytes), message_len)); - } else if (message_len + n < n_columns) + } else if ((flags & OUTPUT_FULL_WIDTH) || + (message_len + n < n_columns)) printf(": %.*s\n", (int) message_len, message); else if (n < n_columns) { char *e; |