From 41e2b939ff3d93d4ba0215171b858016f162d8da Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sat, 4 Feb 2023 19:55:54 -0500 Subject: eshell config --- emacs/.config/emacs-kj/eshell.el | 19 +++++++++++++++++-- emacs/.config/emacs-kj/init.el | 4 ++-- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'emacs') diff --git a/emacs/.config/emacs-kj/eshell.el b/emacs/.config/emacs-kj/eshell.el index b475915..05b7fac 100644 --- a/emacs/.config/emacs-kj/eshell.el +++ b/emacs/.config/emacs-kj/eshell.el @@ -5,12 +5,27 @@ (lambda () (setenv "PAGER" "cat")) (setenv "EDITOR" "emacsclient")) - (setq eshell-prefer-lisp-functions t) + (setq eshell-prefer-lisp-functions nil + eshell-scroll-to-bottom-on-input 'all + eshell-hist-ignoredups t + eshell-error-if-no-glob t) (setq tramp-remote-path '(tramp-own-remote-path)) - (add-to-list 'eshell-load-hook #'kj/on-eshell-load)) + (add-to-list 'eshell-modules-list 'eshell-tramp) + (add-to-list 'eshell-load-hook #'kj/on-eshell-load) + + (add-hook 'eshell-mode-hook 'visual-line-mode)) + +(use-package esh-help + :init + (setup-esh-help-eldoc)) + +(use-package eshell-syntax-highlighting + :hook (eshell-mode . eshell-syntax-highlighting-mode)) (defun kj/on-eshell-load (&args rest) + (add-to-list 'eshell-visual-commands + '("htop" "tmux" "vim" "nvim")) (add-to-list 'eshell-complex-commands "ssh")) (defun eshell/ssh (&rest args) diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el index e26409a..bb0184c 100644 --- a/emacs/.config/emacs-kj/init.el +++ b/emacs/.config/emacs-kj/init.el @@ -84,8 +84,8 @@ :hook (after-init . global-emojify-mode)) (setq-default show-trailing-whitespace t) -(dolist (mode '(calendar-mode-hook eshell-mode-hook)) - (add-hook 'calendar-mode-hook +(dolist (mode '(calendar-mode-hook eshell-mode-hook term-mode-hook)) + (add-hook mode (lambda (&rest args) (setq show-trailing-whitespace nil)))) -- cgit v1.2.3