LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-19-2009, 06:46 PM   #1
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Fedora Core 10, Ubuntu 8.10, CentOS 5
Posts: 180

Rep: Reputation: 30
emacs eshell, how to clear screen?


While in eshell, how to implement the function such that when I type "clear" it will
behave as the "clear" in bash or tcsh? I am unable to find a good working way of doing
this by googling.

Thanks.
 
Old 11-19-2009, 06:52 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Ubuntu, Debian, Android, LFS
Posts: 1,150

Rep: Reputation: 202Reputation: 202Reputation: 202
Parv,

I have no idea what eshell, is, but you might give a try at the alternate method of clearing a screen that works in bash -- that is, <ctrl>-L

<ctrl>-L is the ASCII character 0x0C, for "FF (NP form feed, new page)"

HTH
Jameson
 
Old 11-19-2009, 07:21 PM   #3
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Fedora Core 10, Ubuntu 8.10, CentOS 5
Posts: 180

Original Poster
Rep: Reputation: 30
Thanks.
Actually, there is a function corresponding to Ctrl-L in emacs which does move screen in a cycle mode.
For instance, if I am at the bottom of the screen, the first time I hit C-l would move the screen half way up,
the second hit move it to the top. But as soon as I hit enter, I am at the bottom again with all the stuff
I just tried to hide/get rid of. In this case, i am not happy with the way C-l works.

Quote:
Originally Posted by jhwilliams View Post
Parv,

I have no idea what eshell, is, but you might give a try at the alternate method of clearing a screen that works in bash -- that is, <ctrl>-L

<ctrl>-L is the ASCII character 0x0C, for "FF (NP form feed, new page)"

HTH
Jameson
 
Old 11-19-2009, 07:49 PM   #4
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Fedora Core 10, Ubuntu 8.10, CentOS 5
Posts: 180

Original Poster
Rep: Reputation: 30
found a pretty good example http://www.northbound-train.com/emacs/em-joc.el.
eshell/clear() is almost what I need, just added (eshell-send-input) at the end.
Now, it works as I wanted.

Quote:
Originally Posted by parv View Post
While in eshell, how to implement the function such that when I type "clear" it will
behave as the "clear" in bash or tcsh? I am unable to find a good working way of doing
this by googling.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i replace the clear "clear screen" with the cls command thefedexguy Suse/Novell 2 12-02-2005 05:02 PM
how to clear screen in C ? indian Programming 3 10-01-2004 10:58 PM
clear the screen!!! raven Programming 18 11-24-2003 07:27 PM
Clear the Screen in C++ OrganicX Programming 16 07-23-2003 04:07 PM
How to clear screen? alexzander Programming 1 01-23-2003 08:43 PM


All times are GMT -5. The time now is 01:21 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration