help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eshell clear


From: Nicolas Richard
Subject: Re: eshell clear
Date: Fri, 03 Jul 2015 13:54:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Luca Ferrari <fluca1978@infinito.it> writes:

> Hi,
> this should be trivial, but how can I clear an eshell buffer
> (something similar to 'clear' command in many shells)?

C-c C-t will truncate the buffer to leave just
eshell-buffer-maximum-lines lines.

Based on that, you can do :
(defun luca/eshell-clear-buffer ()
  (interactive)
  (let ((eshell-buffer-maximum-lines 0))
    (eshell-truncate-buffer)))

-- 
Nico.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]