summaryrefslogtreecommitdiff
path: root/dot_config/emacs/lisp/shell-config.el
diff options
context:
space:
mode:
authorSakamoto <me@sakamoto.network>2026-08-16 15:34:00 -0500
committerSakamoto <me@sakamoto.network>2026-08-16 15:34:00 -0500
commitd51beea88d300cb5066bb92a8148cad52fa1091d (patch)
tree4357b4958c19dddd304a0d6ee77994fb9f12c118 /dot_config/emacs/lisp/shell-config.el
parenta623fed63460d6d810605ce1ce858a58a5b222f7 (diff)
downloaddotfiles-d51beea88d300cb5066bb92a8148cad52fa1091d.tar.xz
dotfiles-d51beea88d300cb5066bb92a8148cad52fa1091d.zip
update
Diffstat (limited to 'dot_config/emacs/lisp/shell-config.el')
-rw-r--r--dot_config/emacs/lisp/shell-config.el26
1 files changed, 26 insertions, 0 deletions
diff --git a/dot_config/emacs/lisp/shell-config.el b/dot_config/emacs/lisp/shell-config.el
new file mode 100644
index 0000000..66004df
--- /dev/null
+++ b/dot_config/emacs/lisp/shell-config.el
@@ -0,0 +1,26 @@
+(use-package ghostel
+ :bind (:map ghostel-semi-char-mode-map
+ ("C-s" . consult-line)
+ ;; I'm used to go up/down the shell history with M-n/p from eshell
+ ;; Simulate this behavior in ghostel by sending C-p and C-n
+ ("M-p" . (lambda () (interactive) (ghostel-send-key "p" "ctrl")))
+ ("M-n" . (lambda () (interactive) (ghostel-send-key "n" "ctrl")))
+ :map project-prefix-map
+ ("m" . ghostel-project)
+ ("M" . ghostel-project-list-buffers))
+ :config
+ (add-to-list 'project-switch-commands '(ghostel-project "Ghostel") t)
+ (add-to-list 'project-switch-commands '(ghostel-project-list-buffers "Ghostel buffers") t)
+ (add-to-list 'ghostel-eval-cmds '("magit-status-setup-buffer" magit-status-setup-buffer)))
+
+(use-package ghostel-eshell
+ :ensure nil
+ :hook (eshell-load . ghostel-eshell-visual-command-mode))
+
+(use-package eshell
+ :ensure nil
+ :bind (("C-x m" . eshell))
+ :custom
+ (eshell-destroy-buffer-when-process-dies t))
+
+(provide 'shell-config)