[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 7cf5b37: Avoid leading tabs in shell scripts, sent
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 7cf5b37: Avoid leading tabs in shell scripts, sent by Tramp. |
Date: |
Tue, 17 Mar 2015 19:08:04 +0000 |
branch: master
commit 7cf5b3748cb1c8df5a0189bf6b5e95b550c16668
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Avoid leading tabs in shell scripts, sent by Tramp.
Fixes: debbugs:20118
* tramp-sh.el (tramp-maybe-send-script): Avoid leading tabs in
shell scripts.
---
lisp/ChangeLog | 5 +++++
lisp/net/tramp-sh.el | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b734aaa..cf4eeae 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-17 Michael Albinus <address@hidden>
+
+ * tramp-sh.el (tramp-maybe-send-script): Avoid leading tabs in
+ shell scripts. (Bug#20118)
+
2015-03-17 Eli Zaretskii <address@hidden>
* mouse.el (mouse-appearance-menu): If w32-use-w32-font-dialog is
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index b6c47bc..133d886 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3725,6 +3725,10 @@ Only send the definition if it has not already been
done."
(tramp-get-connection-process vec) "scripts" nil)))
(unless (member name scripts)
(with-tramp-progress-reporter vec 5 (format "Sending script `%s'" name)
+ ;; In bash, leading TABs like in `tramp-vc-registered-read-file-names'
+ ;; could result in unwanted command expansion. Avoid this.
+ (setq script (tramp-compat-replace-regexp-in-string
+ (make-string 1 ?\t) (make-string 8 ? ) script))
;; The script could contain a call of Perl. This is masked with `%s'.
(when (and (string-match "%s" script)
(not (tramp-get-remote-perl vec)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 7cf5b37: Avoid leading tabs in shell scripts, sent by Tramp.,
Michael Albinus <=