diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2023-12-11 08:16:20 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2023-12-11 08:16:20 -0500 |
commit | fafa06e291aea8c0b1cd3d5c9b3a826edbdec66c (patch) | |
tree | d501dc875d0982f3bd081886021bc47f20fd3685 | |
parent | 9811a03e1f9f8cc259ac1f700c74b29cfe81b411 (diff) |
update shell config
-rw-r--r-- | emacs/.config/emacs-kj/init.el | 2 | ||||
-rw-r--r-- | emacs/.config/emacs-kj/lisp/kj-eshell.el | 26 |
2 files changed, 16 insertions, 12 deletions
diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el index a18a8f0..200dd8c 100644 --- a/emacs/.config/emacs-kj/init.el +++ b/emacs/.config/emacs-kj/init.el @@ -822,3 +822,5 @@ (expand-file-name "google.el" user-emacs-directory))) (when (file-exists-p google-config-file) (load-file google-config-file))) + +(use-package pdf-tools) 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) |