diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/eshell/alias | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/main.el | 39 |
2 files changed, 40 insertions, 1 deletions
diff --git a/emacs/.emacs.d/eshell/alias b/emacs/.emacs.d/eshell/alias new file mode 100644 index 0000000..16feb8c --- /dev/null +++ b/emacs/.emacs.d/eshell/alias @@ -0,0 +1,2 @@ +alias up eshell-up $1 +alias pk eshell-up-pk $1 \ No newline at end of file diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index 1135b4a..8add90c 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)) |