summaryrefslogtreecommitdiff
path: root/emacs/.config/emacs-kj/lisp/kj-eshell.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.config/emacs-kj/lisp/kj-eshell.el')
-rw-r--r--emacs/.config/emacs-kj/lisp/kj-eshell.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/emacs/.config/emacs-kj/lisp/kj-eshell.el b/emacs/.config/emacs-kj/lisp/kj-eshell.el
index 3787c67..614694e 100644
--- a/emacs/.config/emacs-kj/lisp/kj-eshell.el
+++ b/emacs/.config/emacs-kj/lisp/kj-eshell.el
@@ -1,9 +1,5 @@
;;; -*- lexical-binding: t; -*-
(use-package eshell
- :bind
- (:map eshell-hist-mode-map
- ("M-r" . consult-history))
-
:config
(add-hook 'eshell-mode-hook
(lambda ()
@@ -20,6 +16,16 @@
(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 esh-help
:init
(setup-esh-help-eldoc))
@@ -27,15 +33,11 @@
(use-package eshell-syntax-highlighting
:hook (eshell-mode . eshell-syntax-highlighting-mode))
-(use-package fish-completion
- :config
- (setq fish-completion-fallback-on-bash-p t)
- :init
- (fish-completion-mode 1))
-
(defun kj/on-eshell-load (&args rest)
- (add-to-list 'eshell-visual-commands
- '("htop" "tmux" "vim" "nvim"))
+ (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)