unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* shell problem in emacs
@ 2006-12-12 15:41 Ronald
  2006-12-12 16:11 ` Robert D. Crawford
  2006-12-12 16:48 ` Holger Sparr
  0 siblings, 2 replies; 3+ messages in thread
From: Ronald @ 2006-12-12 15:41 UTC (permalink / raw)


I'm using a eshell in emacs.
Can I use ``clear"?
My .bashrc file doesn't work here, how to apply it to eshell?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: shell problem in emacs
  2006-12-12 15:41 shell problem in emacs Ronald
@ 2006-12-12 16:11 ` Robert D. Crawford
  2006-12-12 16:48 ` Holger Sparr
  1 sibling, 0 replies; 3+ messages in thread
From: Robert D. Crawford @ 2006-12-12 16:11 UTC (permalink / raw)


Ronald <followait@163.com> writes:

> I'm using a eshell in emacs.
> Can I use ``clear"?

No, it will not work.  One possible solution is to use recenter with an
argument of 0, then issue end-of-line.  One could get creative and
create a function that does the same thing.

(defun eshell-clear ()
  "Mimics the behavior of clear"
  (interactive)
  (recenter 0)
  (end-of-line))

> My .bashrc file doesn't work here, how to apply it to eshell?

That is a good question.  I tried to run 'source' at the eshell prompt,
but that did not work.  Have you looked in the manual?

rdc
-- 
Robert D. Crawford                                      rdc1x@comcast.net

FLASH!
Intelligence of mankind decreasing.
Details at ... uh, when the little hand is on the ....

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: shell problem in emacs
  2006-12-12 15:41 shell problem in emacs Ronald
  2006-12-12 16:11 ` Robert D. Crawford
@ 2006-12-12 16:48 ` Holger Sparr
  1 sibling, 0 replies; 3+ messages in thread
From: Holger Sparr @ 2006-12-12 16:48 UTC (permalink / raw)


Ronald <followait@163.com> schrieb am 12.12.2006:

> I'm using a eshell in emacs.
> Can I use ``clear"?

An already posted solution is:

(defun kai-eshell-erase-buffer ()
  "Erase contents of Eshell Buffer."
  (interactive)
  (let ((eshell-buffer-maximum-lines 0))
    (eshell-truncate-buffer)))

And with:

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

you type "clear RET" in an eshell-buffer and it behaves as expected.

> My .bashrc file doesn't work here, how to apply it to eshell?

What exactly do you want to have available in eshell? The aliases get
stored in ~/.eshell/alias and their syntax is a bit different.

When typing the same unknown command into eshell several times (3 or 4),
you get asked for an alias definition.

Holger

-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-12 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 15:41 shell problem in emacs Ronald
2006-12-12 16:11 ` Robert D. Crawford
2006-12-12 16:48 ` Holger Sparr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).