_exit(EXIT_SUCCESS);
}
-int pager_open(void) {
+int pager_open(bool jump_to_end) {
int fd[2];
const char *pager;
pid_t parent_pid;
dup2(fd[0], STDIN_FILENO);
close_pipe(fd);
- setenv("LESS", "FRSX", 0);
+ if (jump_to_end)
+ setenv("LESS", "FRSXMK+G", 1);
+ else
+ setenv("LESS", "FRSXMK", 1);
/* Make sure the pager goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)