summaryrefslogtreecommitdiff
path: root/src/basic/terminal-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/terminal-util.h')
-rw-r--r--src/basic/terminal-util.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h
index 169ab772ff..6b47c17278 100644
--- a/src/basic/terminal-util.h
+++ b/src/basic/terminal-util.h
@@ -36,6 +36,10 @@
#define ANSI_HIGHLIGHT_YELLOW "\x1B[0;1;33m"
#define ANSI_HIGHLIGHT_BLUE "\x1B[0;1;34m"
#define ANSI_HIGHLIGHT_UNDERLINE "\x1B[0;1;4m"
+#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_NORMAL "\x1B[0m"
#define ANSI_ERASE_TO_END_OF_LINE "\x1B[K"
@@ -111,6 +115,22 @@ static inline const char *ansi_highlight_blue(void) {
return colors_enabled() ? ANSI_HIGHLIGHT_BLUE : "";
}
+static inline const char *ansi_highlight_red_underline(void) {
+ return colors_enabled() ? ANSI_HIGHLIGHT_RED_UNDERLINE : "";
+}
+
+static inline const char *ansi_highlight_green_underline(void) {
+ return colors_enabled() ? ANSI_HIGHLIGHT_GREEN_UNDERLINE : "";
+}
+
+static inline const char *ansi_highlight_yellow_underline(void) {
+ return colors_enabled() ? ANSI_HIGHLIGHT_YELLOW_UNDERLINE : "";
+}
+
+static inline const char *ansi_highlight_blue_underline(void) {
+ return colors_enabled() ? ANSI_HIGHLIGHT_BLUE_UNDERLINE : "";
+}
+
static inline const char *ansi_normal(void) {
return colors_enabled() ? ANSI_NORMAL : "";
}