Subject: [PATCH] Use comint-pager in eshell

From: Morgan Smith <[email-masked]>
Date: Sun, 28 May 2023 18:45:22 -0400

Hello!

I know many people set PAGER=cat for eshell so I wanted to add support
to eshell for this recent feature that was added (comint-pager).

>From 9c22f6cc362d3ddb9fedffe4def4d80ddbe96598 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email-masked]>
Date: Sun, 28 May 2023 18:40:49 -0400
Subject: [PATCH] Use comint-pager in eshell

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Set $PAGER
environment variable from comint-pager variable
---
 lisp/eshell/esh-var.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 7dcaff1e24f..fd2f92a0c31 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -162,6 +162,7 @@ if they are quoted with a backslash."
     ("COLUMNS" ,(lambda () (window-body-width nil 'remap)) t t)
     ("LINES" ,(lambda () (window-body-height nil 'remap)) t t)
     ("INSIDE_EMACS" eshell-inside-emacs t)
+    ("PAGER" comint-pager t)
     ("UID" ,(lambda () (file-user-uid)) nil t)
 
     ;; for esh-ext.el
-- 
2.40.1

Thanks,

Morgan