summaryrefslogtreecommitdiff
path: root/color.h
diff options
context:
space:
mode:
authorArjen Laarhoven <arjen@yaph.org>2009-02-13 21:53:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-02-14 01:27:58 (GMT)
commitdc6ebd4cc5028d59146e02e30f7945ee91974e6e (patch)
tree6028f6a7a3e2baf7b24bde5cd2819c148f0a3c68 /color.h
parent5cd12b85fe8ff74f202a158511ead34e8aba584c (diff)
downloadgit-dc6ebd4cc5028d59146e02e30f7945ee91974e6e.zip
git-dc6ebd4cc5028d59146e02e30f7945ee91974e6e.tar.gz
git-dc6ebd4cc5028d59146e02e30f7945ee91974e6e.tar.bz2
Clean up use of ANSI color sequences
Remove the literal ANSI escape sequences and replace them by readable constants. Signed-off-by: Arjen Laarhoven <arjen@yaph.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'color.h')
-rw-r--r--color.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/color.h b/color.h
index 5019df8..6846be1 100644
--- a/color.h
+++ b/color.h
@@ -4,6 +4,16 @@
/* "\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes */
#define COLOR_MAXLEN 24
+#define GIT_COLOR_NORMAL ""
+#define GIT_COLOR_RESET "\033[m"
+#define GIT_COLOR_BOLD "\033[1m"
+#define GIT_COLOR_RED "\033[31m"
+#define GIT_COLOR_GREEN "\033[32m"
+#define GIT_COLOR_YELLOW "\033[33m"
+#define GIT_COLOR_BLUE "\033[34m"
+#define GIT_COLOR_CYAN "\033[36m"
+#define GIT_COLOR_BG_RED "\033[41m"
+
/*
* This variable stores the value of color.ui
*/