diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 3be4aa0e3b..1277bea8e9 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -41,7 +41,8 @@ # include #endif -#define DEFAULT_PAGER "less -F -X -R" +#define DEFAULT_PAGER "less" +#define DEFAULT_LESS_OPTS "FXR" gboolean colored_output = TRUE; @@ -1891,6 +1892,9 @@ redirect_stdout (void) pager = DEFAULT_PAGER; argv = g_strsplit (pager, " ", 0); + /* Make sure less will show colors, cat and more always show colors */ + g_setenv ("LESS", DEFAULT_LESS_OPTS, FALSE); + /* child process */ close (pipefd[1]); dup2 (pipefd[0], STDIN_FILENO);