[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 <fluca1978@infinito.it> writes:
> On Thu, Jul 18, 2013 at 11:31 AM, yi lu <zhiwudazhanjiangshi@gmail.com> 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."
(interactive)
(goto-history-element 1)
(exit-minibuffer))
(define-key minibuffer-local-shell-command-map (kbd "!")
'yf/last-history-element-and-exit)
then M-! ! does what M-! M-p RET would do.
--
Nico.
- repeat the last single shell command, Luca Ferrari, 2013/07/18
- Message not available
- Re: repeat the last single shell command, Luca Ferrari, 2013/07/18
- Re: repeat the last single shell command,
Nicolas Richard <=
- Re: repeat the last single shell command, Tassilo Horn, 2013/07/18
- Re: repeat the last single shell command, Nicolas Richard, 2013/07/18
- Re: repeat the last single shell command, Tassilo Horn, 2013/07/18
- Re: repeat the last single shell command, Yuri Khan, 2013/07/18
- Message not available
- Re: repeat the last single shell command, Barry Margolin, 2013/07/18
- Message not available
- Re: repeat the last single shell command, Barry Margolin, 2013/07/18
Re: repeat the last single shell command, Peter Dyballa, 2013/07/18
Re: repeat the last single shell command, Tassilo Horn, 2013/07/18