hooks for eshell

This commit is contained in:
Mateus Rodrigues
2023-11-27 12:10:50 +00:00
parent aecc20f5e7
commit b8262f7e82
2 changed files with 12 additions and 9 deletions

View File

@@ -1,18 +1,20 @@
;; colors in eshell ;; colors in eshell
;; (add-hook 'eshell-mode-hook
;; (lambda () (add-hook 'eshell-mode-hook
;; (setenv "TERM" "xterm-256color"))) (lambda ()
;; (add-hook 'eshell-before-prompt-hook (lambda () (setenv "TERM" "xterm-256color")))
;; (setq xterm-color-preserve-properties t))) (add-hook 'eshell-before-prompt-hook (lambda ()
;; (add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter) (setq xterm-color-preserve-properties t)))
;; (setq eshell-output-filter-functions
;; (remove 'eshell-handle-ansi-color eshell-output-filter-functions)) (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 <up> and <down> ;; Don't cycle through history with <up> and <down>
;; Those keys were previously bound to: ;; Those keys were previously bound to:
;; eshell-previous-matching-input-from-input and ;; eshell-previous-matching-input-from-input and
;; eshell-next-matching-input-from-input, respectively ;; eshell-next-matching-input-from-input, respectively
(defun my-eshell-setup () (defun my-eshell-setup ()
(progn (progn
(define-key eshell-hist-mode-map (kbd "<up>") nil) (define-key eshell-hist-mode-map (kbd "<up>") nil)

View File

@@ -2,6 +2,7 @@
(global-set-key (kbd "C-x g") 'magit-status) (global-set-key (kbd "C-x g") 'magit-status)
;; eshell ;; eshell
(global-set-key (kbd "<f4>") 'eshell) (global-set-key (kbd "<f4>") 'eshell)
(global-set-key (kbd "H-e") 'eshell)
;; number pad keys ;; number pad keys
(global-set-key (kbd "<kp-decimal>") 'other-window) (global-set-key (kbd "<kp-decimal>") 'other-window)