1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix adding to history via 'eshell-command'

* lisp/eshell/eshell.el (eshell-read-command): Don't handle history
here.

* lisp/eshell/em-hist.el (eshell-hist-initialize): Properly set up
history for minibuffer.
(eshell-add-command-to-history): Immediately save history.
This commit is contained in:
Jim Porter 2024-05-28 14:43:28 -07:00
parent 647de5e952
commit 7e326b915f
2 changed files with 8 additions and 10 deletions

View file

@ -281,10 +281,7 @@ information on Eshell, see Info node `(eshell)Top'."
(minibuffer-with-setup-hook (lambda ()
(eshell-mode)
(eshell-command-mode +1))
(let ((command (read-from-minibuffer prompt)))
(when (eshell-using-module 'eshell-hist)
(eshell-add-input-to-history command))
command))))
(read-from-minibuffer prompt))))
;;;###autoload
(defun eshell-command (command &optional to-current-buffer)