branch: elpa/exec-path-from-shell
commit 89aed99c12c92d6d66d68d7f0334444ba196d411
Author: Steve Purcell <[email protected]>
Commit: Steve Purcell <[email protected]>

    Can now single-quote format argument to printf
---
 exec-path-from-shell.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index d31458821a..8640d491e1 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -71,13 +71,14 @@
 
 Executes $SHELL as interactive login shell.
 
-STR is inserted literally in a double-quoted argument to printf,
-and may therefore contain backslashed escape sequences.
+STR is inserted literally in a single-quoted argument to printf,
+and may therefore contain backslashed escape sequences understood
+by printf.
 
 ARGS is an optional list of args which will be inserted by printf
-in place of any % placeholders in STR. ARGS are not automatically
+in place of any % placeholders in STR.  ARGS are not automatically
 shell-escaped, so that may contain $ etc."
-  (let ((printf-command (concat "printf \"__RESULT\\000" str "\" "
+  (let ((printf-command (concat "printf '__RESULT\\000" str "' "
                                 (mapconcat #'identity args " "))))
     (with-temp-buffer
       (call-process (getenv "SHELL") nil (current-buffer) nil

Reply via email to