m4/pprint.m4: check that the terminal supports at least 8 colors
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 10 Aug 2019 18:48:23 +0000 (14:48 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sun, 11 Aug 2019 06:42:32 +0000 (02:42 -0400)
Checking for 8 colors is enough here and makes rudimentary terminals
have colors in the report.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Icf49c3f24aa3546a81a52f4627b9f39ab88f929c
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1866
Tested-by: jenkins <jenkins@lttng.org>
m4/pprint.m4

index e55edb6eb9699966f639b1b1fc11789f353bcc6d..9be4a126ee59adfe61e22eef4807014690370863 100644 (file)
@@ -15,7 +15,7 @@ AC_DEFUN([PPRINT_INIT], [
   AC_PATH_PROG([pprint_tput], [tput])
 
   AS_IF([test -n "$pprint_tput"], [
-    AS_IF([test -n "$PS1" && test `"$pprint_tput" colors` -eq 256 && test -t 1], [
+    AS_IF([test -n "$PS1" && test `"$pprint_tput" colors` -ge 8 && test -t 1], [
       # interactive shell and colors supported and standard output
       # file descriptor is opened on a terminal
       PPRINT_COLOR_TXTBLK="`"$pprint_tput" setaf 0`"
This page took 0.024947 seconds and 4 git commands to generate.