summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/eshell-vterm-config.el24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/eshell-vterm-config.el b/modules/eshell-vterm-config.el
index 178f23db0..c882e06fd 100644
--- a/modules/eshell-vterm-config.el
+++ b/modules/eshell-vterm-config.el
@@ -127,6 +127,30 @@
:config
(setenv "TERM" "xterm-256color"))
+(use-package eshell-syntax-highlighting
+ :after esh-mode
+ :config
+ (eshell-syntax-highlighting-global-mode +1))
+
+(use-package eshell-up
+ :after eshell
+ :config
+ (defalias 'eshell/up 'eshell-up)
+ (defalias 'eshell/up-peek 'eshell-up-peek))
+
+;; Enhance history searching
+(defun cj/eshell-history-search ()
+ "Search eshell history with completion."
+ (interactive)
+ (insert
+ (completing-read "Eshell history: "
+ (delete-dups
+ (ring-elements eshell-history-ring)))))
+
+(add-hook 'eshell-mode-hook
+ (lambda ()
+ (define-key eshell-mode-map (kbd "C-r") 'cj/eshell-history-search)))
+
;; ------------------------------ Vterm ------------------------------
;; faster and highly dependable, but not extensible