[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get a read-only prompt in emacs shell
From: |
Marco Baringer |
Subject: |
Re: How to get a read-only prompt in emacs shell |
Date: |
14 Jun 2002 17:57:22 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.30 |
ruhl@4dv.net (Robert Uhl <ruhl@4dv.net>) writes:
> e.baringer@studenti.to.it (Marco Baringer) writes:
> >
> > eshell.
>
> Not too bad. C-a doesn't make sense, though--it goes to the beginning
> of the line, not the beginning of the command-prompt (so the familiar
> C-a C-k doesn't work). Maybe I'll take a look at it when I get a
> round tuit.
my bad, i often forget where the emacs distribution ends and where my
.emacs begins. add this to your .emacs:
(add-hook 'eshell-mode-hook '(lambda ()
(local-set-key (kbd "C-a")
'(lambda ()
(interactive)
(beginning-of-line)
(search-forward-regexp
eshell-prompt-regexp)))))
or for shell-mode (i haven't tested this as i don't use shell-mode)
(add-hook 'shell-mode-hook '(lambda ()
(local-set-key (kbd "C-a")
'(lambda ()
(interactive)
(beginning-of-line)
(search-forward-regexp
shell-prompt-pattern)))))
> --
> Robert Uhl <ruhl@4dv.net>
> I won't insult your intelligence by suggesting that you really believe
> what you just said. --William F. Buckley, Jr.
>
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There's a crack in everything.
It's how the light gets in.
-Isonard Cohen