[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shell-CLI for Emacs
From: |
Emanuel Berg |
Subject: |
shell-CLI for Emacs |
Date: |
Fri, 23 Aug 2013 22:46:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
I have done some experimentation on the "Emacs-shell-CLI" I've
been thinking about (as opposed to the current "M-x-CLI").
I would be very happy if you offered your comments on this idea
(and code).
To try out the below code:
1. Hit M-i to bring up the prompt string.
2. Type "man emacs".
3. Hit RET.
(defun string-to-cmd (str)
(interactive "s $> ")
(let*((cmd-and-args (split-string str " "))
(cmd (car cmd-and-args))
(args (cdr cmd-and-args)))
(eval `(,(read cmd) ,@args) )))
(define-key (current-global-map) (kbd "M-i") 'string-to-cmd)
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
- shell-CLI for Emacs,
Emanuel Berg <=