[Top][All Lists]

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

Re: repeat the last single shell command

From: Luca Ferrari
Subject: Re: repeat the last single shell command
Date: Thu, 18 Jul 2013 16:01:35 +0200

On Thu, Jul 18, 2013 at 3:11 PM, Tassilo Horn <> wrote:

> --8<---------------cut here---------------start------------->8---
> (defvar th-last-shell-command)
> (defadvice shell-command (before th-capture-shell-command
>                                  (command &optional output-buffer 
> error-buffer)
>                                  activate)
>   (setq th-last-shell-command (list command output-buffer error-buffer)))
> (defun th-repeat-last-shell-command ()
>   (interactive)
>   (if th-last-shell-command
>       (apply #'shell-command th-last-shell-command)
>     (message "There's no last shell command!")))
> --8<---------------cut here---------------end--------------->8---

Thank you Tassilo and Nicolas, it is clear I have to customize myself
the behavior and you both provided me good advices.


reply via email to

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