Fix read-only errors when reopening eshell buffers
Caused because eshell would try to insert the banner into the eshell prompt.
This commit is contained in:
parent
b0f59ff5bd
commit
f7a4b639e7
1 changed files with 6 additions and 2 deletions
|
@ -85,7 +85,9 @@
|
|||
(let* ((default-directory (if arg default-directory (doom-project-root)))
|
||||
(buf (+eshell--unused-buffer)))
|
||||
(with-current-buffer (switch-to-buffer buf)
|
||||
(eshell-mode)
|
||||
(if (eq major-mode 'eshell-mode)
|
||||
(run-hooks 'eshell-mode-hook)
|
||||
(eshell-mode))
|
||||
(if command (+eshell-run-command command buf)))
|
||||
buf))
|
||||
|
||||
|
@ -96,7 +98,9 @@
|
|||
(let* ((default-directory (if arg default-directory (doom-project-root)))
|
||||
(buf (+eshell--unused-buffer)))
|
||||
(with-current-buffer (pop-to-buffer buf)
|
||||
(eshell-mode)
|
||||
(if (eq major-mode 'eshell-mode)
|
||||
(run-hooks 'eshell-mode-hook)
|
||||
(eshell-mode))
|
||||
(if command (+eshell-run-command command buf)))
|
||||
buf))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue