Function: eshell-get-old-input

eshell-get-old-input is a byte-compiled function defined in esh-mode.el.gz.

Signature

(eshell-get-old-input &optional USE-CURRENT-REGION)

Documentation

Return the command input on the current line.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-mode.el.gz
(defun eshell-get-old-input (&optional use-current-region)
  "Return the command input on the current line."
  (if use-current-region
      (buffer-substring (min (point) (mark))
			(max (point) (mark)))
    (save-excursion
      (beginning-of-line)
      (and eshell-skip-prompt-function
	   (funcall eshell-skip-prompt-function))
      (let ((beg (point)))
	(end-of-line)
	(buffer-substring beg (point))))))