logo       

Re: Command history in the shell buffer: msg#00003

emacs.macintosh.osx

Subject: Re: Command history in the shell buffer

David Carlton wrote:
> On a related topic, how does one make the shell respond to up-arrow
> and down-arrow the same way as in eshell?
> In eshell up and down will show you the command history (just like the
> shell in a Terminal window) but in shell up and down just move the
> cursor up a line. You are forced to use C-p or C-n.
>
You want something like:

(define-key shell-mode-map "[(up)]" 'comint-previous-input)
(define-key shell-mode-map "[(down)]" 'comint-next-input)

I'm not sure if those key symbols are correct or not, so you might need
to tweak that.
> Just wondering why that was chosen for the default.
>
I think it's just because that's the way Emacs has done it for ages.
---------------------------- Info -----------------------------
List Post: <mailto:macosx-emacs@xxxxxxxxxxxxxxxxx>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise