Eshell - a command equivalent to "clear"?

Eshell - a command equivalent to "clear"?

Post by Stev » Mon, 30 Sep 2002 23:35:33



Hi;

"clear" doesn't do anything in eshell.

I really like to "clear" commands periodically from my view.  Is there
an equivalent command in eshell?

Steve

 
 
 

Eshell - a command equivalent to "clear"?

Post by Daniel Jense » Mon, 30 Sep 2002 23:38:58



> "clear" doesn't do anything in eshell.

> I really like to "clear" commands periodically from my view.  Is there
> an equivalent command in eshell?

Yes, you can type "recenter 0". You can make "clear" an alias for
this, or you can make a simple function for wrapping recenter. Put
this in your .emacs:

(require 'em-term)
(defun eshell/clear ()
  (recenter 0))

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

 
 
 

Eshell - a command equivalent to "clear"?

Post by Kai Gro?joha » Tue, 01 Oct 2002 01:28:46



> "clear" doesn't do anything in eshell.

That's why I use this:

(defun kai-eshell-erase-buffer ()
  (interactive)
  (let ((eshell-buffer-maximum-lines 0))
    (eshell-truncate-buffer)))

(defalias 'eshell/clear 'kai-eshell-erase-buffer)

I don't remember why the function name is different and there is an
alias.  But it works...

kai
--
~/.signature is: umop ap!sdn    (Frank Nobis)

 
 
 

Eshell - a command equivalent to "clear"?

Post by Stev » Wed, 02 Oct 2002 23:59:14


Thanks!


> > "clear" doesn't do anything in eshell.

> That's why I use this:

> (defun kai-eshell-erase-buffer ()
>   (interactive)
>   (let ((eshell-buffer-maximum-lines 0))
>     (eshell-truncate-buffer)))

> (defalias 'eshell/clear 'kai-eshell-erase-buffer)

> I don't remember why the function name is different and there is an
> alias.  But it works...

> kai