summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2023-12-11 21:28:50 -0500
committerKjetil Orbekk <kj@orbekk.com>2023-12-11 21:28:50 -0500
commit7c5bf89bbd3771ec76f9a03c873cf1904ce64c70 (patch)
treefc88c688f93ef6320ab5f2d7d7a5bdfef504a425
parent437fbb7355ee8a1d1bfd7025e074f1cc6cc59f82 (diff)
update
-rw-r--r--emacs/.config/emacs-kj/init.el3
-rw-r--r--emacs/.config/emacs-kj/lisp/kj-eshell.el30
2 files changed, 14 insertions, 19 deletions
diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el
index 200dd8c..4f82728 100644
--- a/emacs/.config/emacs-kj/init.el
+++ b/emacs/.config/emacs-kj/init.el
@@ -79,7 +79,8 @@
(dolist (mode '(calendar-mode-hook
eshell-mode-hook
term-mode-hook
- comint-mode-hook))
+ comint-mode-hook
+ completion-list-mode))
(add-hook mode
(defun kj/disable-trailing-whitespace ()
(setq show-trailing-whitespace nil))))
diff --git a/emacs/.config/emacs-kj/lisp/kj-eshell.el b/emacs/.config/emacs-kj/lisp/kj-eshell.el
index cc96553..0ccfa7b 100644
--- a/emacs/.config/emacs-kj/lisp/kj-eshell.el
+++ b/emacs/.config/emacs-kj/lisp/kj-eshell.el
@@ -1,5 +1,9 @@
;;; -*- lexical-binding: t; -*-
(use-package eshell
+ :bind
+ (:map eshell-mode-map
+ ("M-r" . consult-history))
+ :hook ((eshell-first-time-mode . kj/eshell-on-load))
:config
(add-hook 'eshell-mode-hook
(lambda ()
@@ -14,22 +18,19 @@
eshell-error-if-no-glob t)
(setq tramp-remote-path '(tramp-own-remote-path))
+ (defun kj/eshell-on-load ()
+ (dolist (command '("htop" "tmux" "vim" "nvim"))
+ (add-to-list 'eshell-visual-commands
+ command)))
+
+ (add-to-list 'eshell-complex-commands "ssh")
+
(add-to-list 'eshell-modules-list 'eshell-smart)
(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 bash-completion
- :after eshell
- :init
- (require 'bash-completion)
- (bash-completion-setup)
- (add-hook 'eshell-mode-hook
- (defun kj/eshell-setup-bash-completion ()
- (add-hook 'completion-at-point-functions
- 'bash-completion-capf-nonexclusive nil t))))
+(use-package pcmpl-args)
(use-package esh-help
:init
@@ -38,13 +39,6 @@
(use-package eshell-syntax-highlighting
:hook (eshell-mode . eshell-syntax-highlighting-mode))
-(defun kj/on-eshell-load (&args rest)
- (define-key eshell-hist-mode-map (kbd "M-r") 'consult-history)
- (dolist (command '("htop" "tmux" "vim" "nvim"))
- (add-to-list 'eshell-visual-commands
- command))
- (add-to-list 'eshell-complex-commands "ssh"))
-
(defun eshell/ssh (&rest args)
(if (= 1 (length args))
(throw 'eshell-replace-command