Xterm like Control-L in Eshell

If you want to emulate Control-L in Eshell (the Emacs Shell) like in Xterm, you can use this :

(defun eshell-show-minimum-output ()
  (interactive)
  (goto-char (eshell-beginning-of-output))
  (set-window-start (selected-window)
		    (save-excursion
		      (goto-char (point-max))
		      (line-beginning-position)))
  (eshell-end-of-output))

And add a key bind to it in your custom hook :

  (local-set-key "\C-l" 'eshell-show-minimum-output)</p><p>

This entry was posted in Emacs. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>