4 * This is split up from the rest of git so that we might do
5 * something different on Windows, for example.
10 static void run_pager(const char *pager
)
12 execlp(pager
, pager
, NULL
);
13 execl("/bin/sh", "sh", "-c", pager
, NULL
);
16 void setup_pager(void)
20 const char *pager
= getenv("PAGER");
26 else if (!*pager
|| !strcmp(pager
, "cat"))
29 pager_in_use
= 1; /* means we are emitting to terminal */
40 /* return in the child */
48 /* The original process turns into the PAGER */
53 setenv("LESS", "-RS", 0);
55 die("unable to execute pager '%s'", pager
);