Fix eshell loading

Eshell loads stupidly, so I have to do this ish in it :(
This commit is contained in:
Case Duckworth 2022-01-03 17:05:17 -06:00
parent 8c712dc9f0
commit 7a6a88c321
1 changed files with 11 additions and 5 deletions

16
init.el
View File

@ -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)