From b8262f7e821c6835c452fede6864642118f43017 Mon Sep 17 00:00:00 2001 From: Mateus Rodrigues Date: Mon, 27 Nov 2023 12:10:50 +0000 Subject: [PATCH] hooks for eshell --- elisp/eshell-setup.el | 20 +++++++++++--------- elisp/keypad.el | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/elisp/eshell-setup.el b/elisp/eshell-setup.el index 6a0f0c3..56c51a3 100644 --- a/elisp/eshell-setup.el +++ b/elisp/eshell-setup.el @@ -1,18 +1,20 @@ ;; colors in eshell -;; (add-hook 'eshell-mode-hook -;; (lambda () -;; (setenv "TERM" "xterm-256color"))) -;; (add-hook 'eshell-before-prompt-hook (lambda () -;; (setq xterm-color-preserve-properties t))) -;; (add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter) -;; (setq eshell-output-filter-functions -;; (remove 'eshell-handle-ansi-color eshell-output-filter-functions)) + +(add-hook 'eshell-mode-hook + (lambda () + (setenv "TERM" "xterm-256color"))) +(add-hook 'eshell-before-prompt-hook (lambda () + (setq xterm-color-preserve-properties t))) + +(require 'esh-mode) +(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter) +(setq eshell-output-filter-functions + (remove 'eshell-handle-ansi-color eshell-output-filter-functions)) ;; Don't cycle through history with and ;; Those keys were previously bound to: ;; eshell-previous-matching-input-from-input and ;; eshell-next-matching-input-from-input, respectively - (defun my-eshell-setup () (progn (define-key eshell-hist-mode-map (kbd "") nil) diff --git a/elisp/keypad.el b/elisp/keypad.el index 7d2a07a..751c59c 100644 --- a/elisp/keypad.el +++ b/elisp/keypad.el @@ -2,6 +2,7 @@ (global-set-key (kbd "C-x g") 'magit-status) ;; eshell (global-set-key (kbd "") 'eshell) +(global-set-key (kbd "H-e") 'eshell) ;; number pad keys (global-set-key (kbd "") 'other-window)