From d589bd993b06f16d59150d97f852ab2a80ce4fe6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 24 Sep 1996 20:04:48 +0000 Subject: [PATCH] (shell-command-to-string): New function. --- lisp/simple.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index 6a838e691e1..718b0b8ef3f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -941,6 +941,11 @@ In either case, the output is inserted after point (leaving mark after it)." (set-buffer buffer) (goto-char (point-min))) (display-buffer buffer)))))))) + +(defun shell-command-to-string (command) + "Execute shell command COMMAND and return its output as a string." + (with-output-to-string + (call-process shell-file-name nil t nil "-c" command))) (defconst universal-argument-map (let ((map (make-sparse-keymap))) -- 2.39.2