Re: run a shell command interactively



jason haslup <jason+sawfish haslup com> writes:

> I do the following which uses the sawfish prompt function (I bind it to C-t C-!
> to keep it similar to emacs):
>
> (require 'sawfish.wm.util.prompt)
>
> (defvar jh-exec-history (list)
>   "List of previously executed items.")
>
> (defun jh-prompt-for-exec ()
>   (let ( (e (prompt-from-list jh-exec-history "Execute: " nil t)))
>     (delete e jh-exec-history)
>     (when (and e (not (string= "" e)))
>       (setq jh-exec-history (append (list e) jh-exec-history))
>       (system (concat e "&")))))

Ah, very nice. Thanks. But maybe should make it `interactive' ? so as to
be able to invoke interactively.

--
William


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