mirror of
https://github.com/samsonjs/cheat.el.git
synced 2026-04-27 15:07:39 +00:00
give the cheat buffer a name
This commit is contained in:
parent
e94f2ed56c
commit
688d3b0ec2
1 changed files with 4 additions and 1 deletions
5
cheat.el
5
cheat.el
|
|
@ -135,7 +135,10 @@ The cheat can be saved with `cheat-save-current-buffer'."
|
||||||
(defun cheat-command (&rest rest)
|
(defun cheat-command (&rest rest)
|
||||||
"Run the cheat command with the given arguments, display the output."
|
"Run the cheat command with the given arguments, display the output."
|
||||||
(interactive "sArguments for cheat: \n")
|
(interactive "sArguments for cheat: \n")
|
||||||
(shell-command (concat "cheat " (string-join " " rest))))
|
(let* ((cmd (string-join " " rest))
|
||||||
|
(buffer (get-buffer-create
|
||||||
|
(concat "*Cheat: " cmd "*"))))
|
||||||
|
(shell-command (concat "cheat " cmd) buffer)))
|
||||||
|
|
||||||
(defun cheat-command-to-string (&rest rest)
|
(defun cheat-command-to-string (&rest rest)
|
||||||
"Run the cheat command with the given arguments and return the output as a
|
"Run the cheat command with the given arguments and return the output as a
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue