summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-16 22:34:07 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-16 23:21:51 -0500
commitc0fdf09885ce83cc7edc31f51b03ef284980dfa8 (patch)
tree0be425e14d3f764c584f63ecf89a86397561b5bc /src/shared
parentc0ea486f6e14dcd12390fc674e4ee33426444a3a (diff)
systemctl: highlight filenames in cat
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index 57689e9cf3..dd51e89306 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -64,6 +64,7 @@ union dirent_storage {
#define ANSI_GREEN_ON "\x1B[32m"
#define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
#define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m"
+#define ANSI_HIGHLIGHT_BLUE_ON "\x1B[1;34m"
#define ANSI_HIGHLIGHT_OFF "\x1B[0m"
#define ANSI_ERASE_TO_END_OF_LINE "\x1B[K"
@@ -399,6 +400,10 @@ static inline const char *ansi_highlight_yellow(void) {
return on_tty() ? ANSI_HIGHLIGHT_YELLOW_ON : "";
}
+static inline const char *ansi_highlight_blue(void) {
+ return on_tty() ? ANSI_HIGHLIGHT_BLUE_ON : "";
+}
+
static inline const char *ansi_highlight_off(void) {
return on_tty() ? ANSI_HIGHLIGHT_OFF : "";
}