1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-13 12:58:20 +03:00

systemctl: show service status string in other color

Let's add a dash of colour to separate our own status info from the the
status info supplied by the service.

(I wanted to make this italics, but apparently popular terminal
emulators don't support that, such as xterm)
This commit is contained in:
Lennart Poettering 2023-03-24 22:52:51 +01:00 committed by Yu Watanabe
parent 8489c294f3
commit bf82145576

View File

@ -681,7 +681,7 @@ static void print_status_info(
}
if (i->status_text)
printf(" Status: \"%s\"\n", i->status_text);
printf(" Status: \"%s%s%s\"\n", ansi_highlight_cyan(), i->status_text, ansi_normal());
if (i->status_errno > 0) {
errno = i->status_errno;
printf(" Error: %i (%m)\n", i->status_errno);