From fafa06e291aea8c0b1cd3d5c9b3a826edbdec66c Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Mon, 11 Dec 2023 08:16:20 -0500 Subject: update shell config --- emacs/.config/emacs-kj/init.el | 2 ++ emacs/.config/emacs-kj/lisp/kj-eshell.el | 26 ++++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'emacs/.config') 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) -- cgit v1.2.3