From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jidanni@jidanni.org Newsgroups: gmane.emacs.help Subject: Re: emulate bash's M-. in *shell* Date: Wed, 10 Jun 2009 13:59:16 +0800 Message-ID: <87eits7hor.fsf@jidanni.org> References: <9059181A-D950-4A0B-AF86-A6FA61B465E7@digg.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1244613607 24836 80.91.229.12 (10 Jun 2009 06:00:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jun 2009 06:00:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: ian@digg.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 10 08:00:05 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MEGqy-0001RC-Tj for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Jun 2009 08:00:05 +0200 Original-Received: from localhost ([127.0.0.1]:33326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEGqx-0007Oy-LB for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Jun 2009 02:00:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEGqQ-0007Oi-9B for help-gnu-emacs@gnu.org; Wed, 10 Jun 2009 01:59:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEGqK-0007OK-Mo for help-gnu-emacs@gnu.org; Wed, 10 Jun 2009 01:59:29 -0400 Original-Received: from [199.232.76.173] (port=59315 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEGqK-0007O7-26 for help-gnu-emacs@gnu.org; Wed, 10 Jun 2009 01:59:24 -0400 Original-Received: from caiajhbdcagg.dreamhost.com ([208.97.132.66]:33098 helo=homiemail-a2.g.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEGqJ-0004Uj-HY for help-gnu-emacs@gnu.org; Wed, 10 Jun 2009 01:59:23 -0400 Original-Received: from jidanni.org (122-127-33-51.dynamic.hinet.net [122.127.33.51]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by homiemail-a2.g.dreamhost.com (Postfix) with ESMTP id B651BD26E7; Tue, 9 Jun 2009 22:59:20 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65108 Archived-At: Ian Eure writes: >> In bash I can do ESC . which outputs the last line's last item. >> How can I do that in emacs *shell*? > Use the !$ event: > You can also use !^ for the first argument, or !!:N for the Nth last Thanks but being half a century old, M-. is already embedded in my brain, so I wish to make emacs act like bash in this area. Furthermore, I turned off all that ! stuff in bash long ago, as maybe back in csh it was needed, but now with readline, all it did was add landmines. But true, M-. is just the measly last argument, the ! stuff gives one all of them. Wait, C-c . runs the command comint-insert-previous-argument ...This command is like `M-.' in bash. OK, I'll just rebind that. Thanks. Bye.