From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Running bash inside emacs Date: Wed, 04 May 2005 08:53:54 +1000 Message-ID: <871x8nzzst.fsf@tiger.rapttech.com.au> References: <4277aa50$0$79460$14726298@news.sunsite.dk> <87mzrc88os.fsf@thalassa.informatimago.com> <4277c7c8$0$79454$14726298@news.sunsite.dk> Reply-To: timx@spamto.devnul.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115234350 28371 80.91.229.2 (4 May 2005 19:19:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 May 2005 19:19:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 04 21:19:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTPOW-0006YK-IS for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2005 21:18:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTPVr-0004FX-LV for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2005 15:26:27 -0400 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:pbPDfNQ7AWmiFfGcbqYx6iPxPg0= Original-NNTP-Posting-Host: ppp27-228.lns1.syd2.internode.on.net Original-X-Trace: duster.adelaide.on.net 1115160835 59.167.27.228 (4 May 2005 08:23:55 +0950) Original-Lines: 55 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed-west.nntpserver.com!news1.optus.net.au!optus!news.mel.connect.com.au!news-south.connect.com.au!duster.adelaide.on.net!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:130635 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:26287 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26287 Madhusudan Singh writes: > Pascal Bourguignon wrote: > >> Madhusudan Singh writes: >>> I was wondering if it is possible to run a bash shell inside an emacs >>> buffer (where the up and down keys recall commands executed >>> in .bash_history and do not move the cursor around -- the problem with >>> the native shell available in emacs, tab results in command completion, >>> etc.). >> >> M-x shell RET >> >> Since emacs implement its own history and completion, the keys are >> usually bound to emacs functions, and not passed to the inferior >> shell. >> >> If you want to run an old command from ~/.bash_history, you could type: >> >> sort -u < ~/.bash_history >> >> then move to the line with the command and type RET. >> >> >> > > Thanks for your response. I posted this question because I am not > comfortable with the solution you showed. > > Typing in sort commands, etc. when you can just open up a native bash shell > and use up/down keys to your heart's content, does not make any sense at > all. This is especially important when you are debugging some code and need > access to the shell, repeatedly. The solution you list would be a > horrendous waste of typing and time in that case. > You have a number of choices - M-x term M-x shell (note you need to use C-up/C-down to get the command line history. Also, don't discount eshell too quickly - it is very powerful and offers a lot of functionality which is not obvious straight away. Tim -- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!