From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.help Subject: Inject some eshell features into shell? Date: Wed, 15 Oct 2003 21:36:57 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <86fzhuqome.fsf@slowfox.dyndns.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066247803 27491 80.91.224.253 (15 Oct 2003 19:56:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 19:56:43 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 15 21:56:40 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9rlA-00037b-00 for ; Wed, 15 Oct 2003 21:56:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9rki-00075j-E2 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Oct 2003 15:56:12 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!p508e3d3b.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: p508e3d3b.dip.t-dialin.net (80.142.61.59) Original-X-Trace: news.uni-berlin.de 1066246522 23469524 80.142.61.59 (16 [73968]) User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (berkeley-unix) Cancel-Lock: sha1:PrJeeFqUh19hdqMi5rQXWHrwB2w= Original-Xref: shelby.stanford.edu gnu.emacs.help:117289 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13218 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13218 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.)