gst-inspect: Use less -F -X everywhere as the pager

This emulates the default behaviour of git help pages, and also fixes
a bug on macOS where `less -F` doesn't display anything at all when
the output is shorter than one terminal screen.

Also moved the DEFAULT_PAGER define to after the includes, because
it's an unprefixed define.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/330
This commit is contained in:
Nirbheek Chauhan 2018-11-23 03:31:38 +05:30
parent bd83f11b71
commit a3abe8b9ae

View file

@ -29,8 +29,6 @@
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#define DEFAULT_PAGER "less -F"
#include "tools.h"
#include <gst/gst_private.h> /* for internal Factories */
@ -42,6 +40,8 @@
# include <sys/wait.h>
#endif
#define DEFAULT_PAGER "less -F -X"
static char *_name = NULL;
static int indent = 0;