if (!*pager || streq(pager, "cat"))
return 0;
- if (isatty(STDOUT_FILENO) <= 0)
+ if (!on_tty())
return 0;
/* Determine and cache number of columns before we spawn the
dup2(fd[0], STDIN_FILENO);
close_pipe(fd);
- setenv("LESS", "FRSX", 0);
+ setenv("LESS", "FRSXK", 0);
/* Make sure the pager goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)