From fc106093e726c68de803ca91ac0c99e225faf005 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Sun, 27 Nov 2022 14:47:09 -0900 Subject: [PATCH] Eshell completion. Not sure if this actually does anything. --- lisp/mitch-packages.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lisp/mitch-packages.el b/lisp/mitch-packages.el index b27f72b..3c20285 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mitch-packages.el @@ -728,6 +728,20 @@ Return nil if DIR is not in a hugo project at all." ;; (company-fuzzy-history-backends '(company-yasnippet)) ;; (company-fuzzy-trigger-symbols '("." "->" "<" "\"" "'" "@")) ;; (company-fuzzy-passthrough-backends '(company-capf))) +(use-package bash-completion + :after eshell + :config + (defun bash-completion-from-eshell () + (interactive) + (let ((completion-at-point-functions '(bash-completion-eshell-capf))) + (completion-at-point))) + (defun bash-completion-eshell-capf () + (bash-completion-dynamic-complete-nocomint + (save-excursion (eshell-bol) (point)) (point) t)) + :general (general-define-key + :states 'insert + :maps 'eshell-mode-map + "TAB" 'bash-completion-from-eshell)) (use-package corfu :custom (completion-cycle-threshold 3)