help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: repeat the last single shell command


From: Tassilo Horn
Subject: Re: repeat the last single shell command
Date: Thu, 18 Jul 2013 16:18:58 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

>> Here's an improved version that does handle ! (or whatever char
>> you've bound `yf/last-history-element-and-exit' to) only special if
>> it's the first char entered at the prompt.
>
> Agreed. Perhaps one of (eq last-command 'shell-command) or (equal ""
> (minibuffer-contents-no-properties)) might be used as a more specific
> test too, e.g. :

That ties it to `shell-command'.  You could bind the other version also
in `minibuffer-local-map', and then `M-: !' would reevaluate the last
lisp expression, `M-! !' would reexecute the last shell command, `M-x !'
would execute the last complex command, `C-x C-f !'  would find the last
found file, `C-x b !' would switch to the last switched to buffer, etc.

Bye,
Tassilo



reply via email to

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