Function: eshell-add-to-history

eshell-add-to-history is a byte-compiled function defined in em-hist.el.gz.

Signature

(eshell-add-to-history)

Documentation

Add last Eshell command to the history ring.

The command is entered into the input history ring, if the value of variable eshell-input-filter returns non-nil when called on the command.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-hist.el.gz
(defun eshell-add-to-history ()
  "Add last Eshell command to the history ring.
The command is entered into the input history ring, if the value of
variable `eshell-input-filter' returns non-nil when called on the
command."
  (when (> (1- eshell-last-input-end) eshell-last-input-start)
    (let ((input (buffer-substring eshell-last-input-start
				   (1- eshell-last-input-end))))
      (eshell-add-input-to-history input))))