emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master d381db2 1/2: Protect environment variables with dou


From: Michael Albinus
Subject: [Emacs-diffs] master d381db2 1/2: Protect environment variables with double quotes in Tramp
Date: Thu, 15 Dec 2016 08:37:50 +0000 (UTC)

branch: master
commit d381db25a201fa67b7e274a758d6a7c2c350067e
Author: Dominique Quatravaux <address@hidden>
Commit: Michael Albinus <address@hidden>

    Protect environment variables with double quotes in Tramp
    
    * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    Protect environment variables with double quotes.
    
    Copyright-paperwork-exempt: yes
---
 lisp/net/tramp-sh.el |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 419dccb..31ef2ef 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4201,10 +4201,11 @@ process to set up.  VEC specifies the connection."
       (when vars
        (tramp-send-command
         vec
-        (format "while read var val; do export $var=$val; done <<'%s'\n%s\n%s"
-                tramp-end-of-heredoc
-                (mapconcat 'identity vars "\n")
-                tramp-end-of-heredoc)
+        (format
+         "while read var val; do export $var=\"$val\"; done <<'%s'\n%s\n%s"
+         tramp-end-of-heredoc
+         (mapconcat 'identity vars "\n")
+         tramp-end-of-heredoc)
         t))
       (when unset
        (tramp-send-command



reply via email to

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