[Top][All Lists]

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

Re: emulate bash's M-. in *shell*

From: Ian Eure
Subject: Re: emulate bash's M-. in *shell*
Date: Tue, 9 Jun 2009 22:44:32 -0700

On Jun 9, 2009, at 3:35 PM, address@hidden wrote:

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:

ieure!electron:~$ mkdir /tmp/foo
ieure!electron:~$ ls -ld !$
ls -ld /tmp/foo
drwxr-xr-x 2 ieure wheel 68 2009-06-09 22:37 /tmp/foo/

You can also use !^ for the first argument, or !!:N for the Nth last argument. Section 9.3.2 of the bash manual has the full rundown, though it's somewhat lacking in practical examples.

 - Ian

reply via email to

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