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

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

Inject some eshell features into shell?


From: Kai Grossjohann
Subject: Inject some eshell features into shell?
Date: Wed, 15 Oct 2003 21:36:57 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (berkeley-unix)

Even though I now know how to do for loops in eshell, I was wondering
if the following idea might be fun to play with.  Maybe someone has
already done this and would like to share?

I find that the feature I use most in eshell is the fact that I can
type "vi foo.c" to edit that file in Emacs, as if I had typed C-x C-f
foo.c.  (This does suffer from the bad effect that I'm somehow
conditioned to do file editing differently if I have started it with
vi, so suddenly I'm seeing a lot of hjkl and ZZ in my files ;-)  It
is, however, a perfect companion to Viper.  I never could get used to
typing "find-file foo.c".)

So maybe it would be nifty if one could somehow hook a function into
the RET key in shell-mode that looks if it recognizes the command on
the current line.  If so, it invokes a given Lisp function, depending
on the command.  That way, I could get the "vi foo.c" back.  Other
candidates would be "man" and "less", I guess.

(Another feature I use a lot is the completion, but I think marrying
pcomplete and shell-mode isn't going to be difficult.)


reply via email to

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