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

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

Re: how to make eshell behave more like cmushell?


From: Kevin Rodgers
Subject: Re: how to make eshell behave more like cmushell?
Date: Wed, 18 Jan 2006 10:58:53 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Joakim Verona wrote:
> I'm used to using cmushell in emacs, but eshell is alluring.
>
> However, there are some problems.
>
> - I want c-p and c-r to behave as in cmushell. That is, I should move
>   in the buffer rather than in input history.

In CMU shell mode, C-p is bound to comint-previous-prompt and C-r is
bound to comint-show-output.  In EShell mode, eshell-previous-prompt is
on C-c C-p and eshell-show-output is on C-M-l, so presumably all you
need to do is add your preferred bindings:

(add-hook 'eshell-mode-hook
          (lambda ()
            (local-set-key "\C-p" 'eshell-previous-prompt) ; vs. C-c C-p
            (local-set-key "\C-r" 'eshell-show-output)))   ; vs. C-M-l

> the eshell behaviour of c-r is more intuitive than M-r in cmushell
> though, so where should I put it? I can rebind it myself, but maybe
> someone else already figured out a clever way for this.

C-r isn't bound in EShell mode and simply defaults to its global binding
(isearch-backward).  Neither is M-r bound in CMU shell mode, simply
defaulting to its global binding (move-to-window-line).

I think you should just learn to use EShell mode's bindings.

--
Kevin Rodgers





reply via email to

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