making some eshell changes

This commit is contained in:
Chris Cochrun 2024-07-15 10:07:49 -05:00
parent 50d9ded24c
commit 448c1cd2fc
2 changed files with 26 additions and 0 deletions

View file

@ -3072,6 +3072,8 @@ Ace link provides an avy like search for links. Upon using the keybindings prese
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . bottom) (side . bottom)
(window-height . 0.25)) (window-height . 0.25))
("\\*e?shell\\*<20>"
(display-buffer-same-window))
("\\*e?shell-terminal\\*" ("\\*e?shell-terminal\\*"
(display-buffer-same-window)) (display-buffer-same-window))
("*helpful*" ("*helpful*"
@ -3126,6 +3128,8 @@ Ace link provides an avy like search for links. Upon using the keybindings prese
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . bottom) (side . bottom)
(window-height . 0.25)) (window-height . 0.25))
("\\*e?shell\\*"
(display-buffer-same-window))
("\\*e?shell-terminal\\*" ("\\*e?shell-terminal\\*"
(display-buffer-same-window)) (display-buffer-same-window))
("*helpful*" ("*helpful*"
@ -4506,6 +4510,12 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
"*upgrade*" "*upgrade*"
"*upgrade-errors*"))) "*upgrade-errors*")))
(defun chris/eshell-current-window ()
"Open eshell in the current directory using the current window"
(interactive)
(same-window-prefix)
(eshell))
(setq eshell-command-aliases-list (setq eshell-command-aliases-list
`(("q" "exit") `(("q" "exit")
("f" "find-file $1") ("f" "find-file $1")
@ -4563,6 +4573,7 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
"oe" 'chris/eshell-new "oe" 'chris/eshell-new
"oE" 'chris/eshell-current-window
"be" 'eshell) "be" 'eshell)
(general-def '(normal insert) eshell-mode-map (general-def '(normal insert) eshell-mode-map
"C-d" 'kill-buffer-and-window "C-d" 'kill-buffer-and-window
@ -4587,7 +4598,11 @@ Emulate a terminal
** Vterm ** Vterm
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq vterm-buffer-name-string "vterm %s" (setq vterm-buffer-name-string "vterm %s"
<<<<<<< HEAD
vterm-shell "/run/current-system/sw/bin/nu") vterm-shell "/run/current-system/sw/bin/nu")
=======
vterm-shell "/run/current-system/sw/bin/fish")
>>>>>>> 3f6bc9c5 (making some eshell changes)
(defun chris/vterm-setup () (defun chris/vterm-setup ()
"Setup vterm with my preferred settings" "Setup vterm with my preferred settings"
(display-line-numbers-mode -1)) (display-line-numbers-mode -1))

11
init.el
View file

@ -2250,6 +2250,8 @@ targets."
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . bottom) (side . bottom)
(window-height . 0.25)) (window-height . 0.25))
("\\*e?shell\\*<20>"
(display-buffer-same-window))
("\\*e?shell-terminal\\*" ("\\*e?shell-terminal\\*"
(display-buffer-same-window)) (display-buffer-same-window))
("*helpful*" ("*helpful*"
@ -2304,6 +2306,8 @@ targets."
(display-buffer-in-side-window) (display-buffer-in-side-window)
(side . bottom) (side . bottom)
(window-height . 0.25)) (window-height . 0.25))
("\\*e?shell\\*"
(display-buffer-same-window))
("\\*e?shell-terminal\\*" ("\\*e?shell-terminal\\*"
(display-buffer-same-window)) (display-buffer-same-window))
("*helpful*" ("*helpful*"
@ -3305,6 +3309,12 @@ targets."
"*upgrade*" "*upgrade*"
"*upgrade-errors*"))) "*upgrade-errors*")))
(defun chris/eshell-current-window ()
"Open eshell in the current directory using the current window"
(interactive)
(same-window-prefix)
(eshell))
(setq eshell-command-aliases-list (setq eshell-command-aliases-list
`(("q" "exit") `(("q" "exit")
("f" "find-file $1") ("f" "find-file $1")
@ -3362,6 +3372,7 @@ targets."
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
"oe" 'chris/eshell-new "oe" 'chris/eshell-new
"oE" 'chris/eshell-current-window
"be" 'eshell) "be" 'eshell)
(general-def '(normal insert) eshell-mode-map (general-def '(normal insert) eshell-mode-map
"C-d" 'kill-buffer-and-window "C-d" 'kill-buffer-and-window