[Top][All Lists]

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

Re: repeat the last single shell command

From: Nicolas Richard
Subject: Re: repeat the last single shell command
Date: Thu, 18 Jul 2013 14:42:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Luca Ferrari <> writes:

> On Thu, Jul 18, 2013 at 11:31 AM, yi lu <> wrote:
>> Will "Up" arrow instead of "M-p" work?
> Yes, it works, but that's pretty much the same of M-p. I'd like to
> know if there's some shortcut, let's say like M-!!, to immediatly
> repeat the last command. Otherwise I have to define a function.

I think M-! M-p RET is simple enough, but you can do this:

(defun yf/last-history-element-and-exit ()
  "Select the last history element."
  (goto-history-element 1)
(define-key minibuffer-local-shell-command-map (kbd "!") 

then M-! ! does what M-! M-p RET would do.


reply via email to

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