diff options
author | Jan Synacek <jsynacek@redhat.com> | 2016-01-19 10:17:19 +0100 |
---|---|---|
committer | Jan Synacek <jsynacek@redhat.com> | 2016-01-20 10:12:41 +0100 |
commit | 40c9fe4c0862114dab390c8ed16f78cf056b9140 (patch) | |
tree | 04bb1f55765a432bb0495963871eaf6dcd10faaf /src/login | |
parent | d619a0c4a5bf4f9d5796bcac77160a14e4e24cb6 (diff) |
basic/terminal-util: introduce SYSTEMD_COLORS environment variable
... to determine if color output should be enabled. If the variable is not set,
fall back to using on_tty(). Also, rewrite existing code to use
colors_enabled() where appropriate.
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/loginctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c index 816349c559..931b96fe51 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -88,7 +88,7 @@ static OutputFlags get_output_flags(void) { arg_all * OUTPUT_SHOW_ALL | arg_full * OUTPUT_FULL_WIDTH | (!on_tty() || pager_have()) * OUTPUT_FULL_WIDTH | - on_tty() * OUTPUT_COLOR; + colors_enabled() * OUTPUT_COLOR; } static int list_sessions(int argc, char *argv[], void *userdata) { |