From: Lennart Poettering Date: Fri, 10 May 2019 18:55:59 +0000 (-0400) Subject: terminal-util: reduce colors we define a bit X-Git-Tag: v243-rc1~422^2~3 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=1530bf251a110878febeca4a21b31fb68a01b50b terminal-util: reduce colors we define a bit three of these colors we never use, so let's drop them. Let's however add a highlight version of grey, so that at least for all colors we do define we have all possible styles defined. --- diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h index 6a77e5ebb9b..90de9a479e9 100644 --- a/src/basic/terminal-util.h +++ b/src/basic/terminal-util.h @@ -11,35 +11,28 @@ #include "time-util.h" /* Regular colors */ -#define ANSI_BLACK "\x1B[0;30m" #define ANSI_RED "\x1B[0;31m" #define ANSI_GREEN "\x1B[0;32m" #define ANSI_YELLOW "\x1B[0;33m" #define ANSI_BLUE "\x1B[0;34m" #define ANSI_MAGENTA "\x1B[0;35m" -#define ANSI_CYAN "\x1B[0;36m" -#define ANSI_WHITE "\x1B[0;37m" #define ANSI_GREY "\x1B[0;38;5;245m" /* Bold/highlighted */ -#define ANSI_HIGHLIGHT_BLACK "\x1B[0;1;30m" #define ANSI_HIGHLIGHT_RED "\x1B[0;1;31m" #define ANSI_HIGHLIGHT_GREEN "\x1B[0;1;32m" #define ANSI_HIGHLIGHT_YELLOW "\x1B[0;1;33m" #define ANSI_HIGHLIGHT_BLUE "\x1B[0;1;34m" #define ANSI_HIGHLIGHT_MAGENTA "\x1B[0;1;35m" -#define ANSI_HIGHLIGHT_CYAN "\x1B[0;1;36m" -#define ANSI_HIGHLIGHT_WHITE "\x1B[0;1;37m" +#define ANSI_HIGHLIGHT_GREY "\x1B[0;1;38;5;245m" /* Underlined */ -#define ANSI_HIGHLIGHT_BLACK_UNDERLINE "\x1B[0;1;4;30m" #define ANSI_HIGHLIGHT_RED_UNDERLINE "\x1B[0;1;4;31m" #define ANSI_HIGHLIGHT_GREEN_UNDERLINE "\x1B[0;1;4;32m" #define ANSI_HIGHLIGHT_YELLOW_UNDERLINE "\x1B[0;1;4;33m" #define ANSI_HIGHLIGHT_BLUE_UNDERLINE "\x1B[0;1;4;34m" #define ANSI_HIGHLIGHT_MAGENTA_UNDERLINE "\x1B[0;1;4;35m" -#define ANSI_HIGHLIGHT_CYAN_UNDERLINE "\x1B[0;1;4;36m" -#define ANSI_HIGHLIGHT_WHITE_UNDERLINE "\x1B[0;1;4;37m" +#define ANSI_HIGHLIGHT_GREY_UNDERLINE "\x1B[0;1;4;38;5;245m" /* Other ANSI codes */ #define ANSI_UNDERLINE "\x1B[0;4m"