emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/exec-path-from-shell 89aed99c12 021/114: Can now single-qu


From: ELPA Syncer
Subject: [nongnu] elpa/exec-path-from-shell 89aed99c12 021/114: Can now single-quote format argument to printf
Date: Tue, 5 Sep 2023 03:59:57 -0400 (EDT)

branch: elpa/exec-path-from-shell
commit 89aed99c12c92d6d66d68d7f0334444ba196d411
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>

    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

[Prev in Thread] Current Thread [Next in Thread]