Commit ab4e4cc9 authored by Vibhav Pant's avatar Vibhav Pant
Browse files

Add 'clear' functionality to eshell.

* eshell/esh-mode.el (eshell/clear): New function.

* etc/NEWS: Mention new built-in command.
parent 3eb4d23a
......@@ -556,6 +556,10 @@ to avoid interfering with the kill ring.
allow overriding the regular expression that recognizes the ldapsearch
command line's password prompt.
** Eshell
*** The new built-in command `clear' can scroll window contents out of sight.
** tar-mode: new `tar-new-entry' command, allowing for new members to
be added to the archive.
2015-03-16 Vibhav Pant <>
* eshell/esh-mode.el (eshell/clear): New function.
2015-03-16 Alan Mackenzie <>
Make Edebug work with Follow Mode.
......@@ -871,6 +871,13 @@ When run interactively, widen the buffer first."
(goto-char (point-max))
(recenter -1))
(defun eshell/clear ()
"Scroll contents of eshell window out of sight, leaving a blank window."
(let ((number-newlines (count-lines (window-start) (point))))
(insert (make-string number-newlines ?\n)))
(defun eshell-get-old-input (&optional use-current-region)
"Return the command input on the current line."
(if use-current-region
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment