Function: eshell-delete-output

eshell-delete-output is an interactive and byte-compiled function defined in esh-mode.el.gz.

Signature

(eshell-delete-output &optional KILL)

Documentation

Delete all output from interpreter since last input.

If KILL is non-nil (interactively, the prefix), save the killed text in the kill ring.

This command does not delete the prompt.

Key Bindings

Aliases

eshell-kill-output (obsolete since 30.1)

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-mode.el.gz
(defun eshell-delete-output (&optional kill)
  "Delete all output from interpreter since last input.
If KILL is non-nil (interactively, the prefix), save the killed text in
the kill ring.

This command does not delete the prompt."
  (interactive "P")
  (save-excursion
    (goto-char (eshell-beginning-of-output))
    (insert "*** output flushed ***\n")
    (when kill
      (copy-region-as-kill (point) (eshell-end-of-output)))
    (delete-region (point) (eshell-end-of-output))))