summary refs log tree commit diff stats
path: root/emacs/.emacs.d/main.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/main.el')
-rw-r--r--emacs/.emacs.d/main.el39
1 files changed, 38 insertions, 1 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 1135b4a2..8add90c8 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -280,7 +280,8 @@ With two prefix arguments, write out the day and month name."
             (add-to-list 'projectile-globally-ignored-files "package-lock.json")
             (add-to-list 'projectile-globally-ignored-files "pnpm-lock.yaml")
 	    (with-eval-after-load 'evil-ex
-	      (evil-ex-define-cmd "prg" #'projectile-ripgrep))))
+	      (evil-ex-define-cmd "prg" #'projectile-ripgrep)
+              (evil-ex-define-cmd "pesh[ell]" #'projectile-run-eshell))))
 
 (use-package counsel-projectile
   :commands (counsel-projectile-switch-project
@@ -439,11 +440,47 @@ With two prefix arguments, write out the day and month name."
 
 (use-package eshell
   :defer 5
+  :commands (eshell)
   :functions (eshell/pwd)
+  :init (progn
+          (with-eval-after-load 'evil-ex
+            (evil-ex-define-cmd "esh[ell]" #'eshell)))
   :custom ((eshell-prompt-function (lambda ()
                                      (concat (eshell/pwd) "\n$ ")))
            (eshell-prompt-regexp "^[$][[:blank:]]")))
 
+(use-package esh-autosuggest
+  :ghook ('eshell-mode-hook))
+
+(defun my-bind-esh-push ()
+  (general-define-key
+   :states '(normal insert)
+   :keymaps 'local
+   "M-q" #'eshell-push-command))
+
+(use-package esh-buf-stack
+  :ghook ('eshell-mode-hook #'my-bind-esh-push)
+  :config (setup-eshell-buf-stack))
+
+(use-package bash-completion
+  :after (eshell))
+
+(use-package fish-completion
+  :when (executable-find "fish")
+  :after (bash-completion)
+  :custom ((fish-completion-fallback-on-bash-p t))
+  :config (global-fish-completion-mode))
+
+(use-package esh-help
+  :after (eshell)
+  :config (setup-esh-help-eldoc))
+
+(use-package eshell-fringe-status
+  :ghook '(eshell-mode-hook))
+
+(use-package eshell-up
+  :after (eshell))
+
 (use-package shell
   :general (:keymaps 'shell-mode-map
                      "C-d" #'comint-delchar-or-maybe-eof))