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

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

Re: Running bash inside emacs


From: Tim X
Subject: Re: Running bash inside emacs
Date: Wed, 04 May 2005 08:53:54 +1000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Madhusudan Singh <spammers-go-here@spam.invalid> writes:

> Pascal Bourguignon wrote:
>
>> Madhusudan Singh <spammers-go-here@spam.invalid> 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 <ret>

M-x shell <ret> (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!


reply via email to

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