* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Protect environment variables with double quotes.
Copyright-paperwork-exempt: yes
(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