From 7a6a88c321ddf07475c8129e395ad299b6262ef7 Mon Sep 17 00:00:00 2001
From: Case Duckworth
Date: Mon, 3 Jan 2022 17:05:17 -0600
Subject: Fix eshell loading

Eshell loads stupidly, so I have to do this ish in it :(
---
 init.el | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/init.el b/init.el
index 066741a..84f382a 100644
--- a/init.el
+++ b/init.el
@@ -255,11 +255,17 @@
            eshell-scroll-to-bottom-on-input 'all
            eshell-smart-space-goes-to-end t
            eshell-where-to-jump 'begin)
-  (:local-set outline-regexp eshell-prompt-regexp
-              page-delimiter eshell-prompt-regexp)
-  (:bind "C-d" #'+eshell-quit-or-delete-char)
-  (:when-loaded
-    (setenv "PAGER" "cat")))
+  (add-hook 'eshell-mode-hook
+            (defun +eshell@setup ()
+              "Eshell improperly does loading. Gah."
+              (dolist (setting `((outline-regexp . ,eshell-prompt-regexp)
+                                 (page-delimiter . ,eshell-prompt-regexp)))
+                (set (make-local-variable (car setting)) (cdr setting)))
+              (dolist (binding `(("C-d" . +eshell-quit-or-delete-char)))
+                (define-key eshell-mode-map
+                  (kbd (car binding)) (cdr binding)))
+              (dolist (environment `(("PAGER" . "cat")))
+                (setenv (car environment) (cdr environment))))))
 
 (setup eww
   (:also-load +eww)
-- 
cgit 1.4.1-21-gabe81