diff options
Diffstat (limited to 'pager.c')
-rw-r--r-- | pager.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -15,11 +15,13 @@ void setup_pager(void) { pid_t pid; int fd[2]; - const char *pager = getenv("PAGER"); + const char *pager = getenv("GIT_PAGER"); if (!isatty(1)) return; if (!pager) + pager = getenv("PAGER"); + if (!pager) pager = "less"; else if (!*pager || !strcmp(pager, "cat")) return; |