summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2014-05-06 10:42:53 +0200
committerMichael Albinus <michael.albinus@gmx.de>2014-05-06 10:42:53 +0200
commit3e59ead144c917d4d6ae27963f0f49b4aaf28d78 (patch)
tree0bdada1e11470d9c2984fbc9bf97581b8ea324e4
parent03810324a41b365104fd940ac4d8f702a914410e (diff)
downloademacs-3e59ead144c917d4d6ae27963f0f49b4aaf28d78.tar.gz
Fix Bug#17295.
* net/tramp-sh.el (tramp-remote-process-environment): Remove HISTFILE and HISTSIZE; it's too late to set them here. Add :version entry. (tramp-open-shell): Do not let-bind `tramp-end-of-output'. Add "HISTSIZE=/dev/null" to the shell's env arguments. Do not send extra "PSx=..." commands. (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/net/tramp-sh.el17
2 files changed, 17 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 713d34dda8d..8a6b61b891b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2014-05-06 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp-sh.el (tramp-remote-process-environment): Remove
+ HISTFILE and HISTSIZE; it's too late to set them here. Add
+ :version entry.
+ (tramp-open-shell): Do not let-bind `tramp-end-of-output'. Add
+ "HISTSIZE=/dev/null" to the shell's env arguments. Do not send
+ extra "PSx=..." commands.
+ (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
+ (Bug#17295)
+
2014-05-06 Glenn Morris <rgm@gnu.org>
* emacs-lisp/find-gc.el (find-gc-source-directory): Give it a value.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 9c86c8c48bd..431d6183d71 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -425,7 +425,7 @@ as given in your `~/.profile'."
;;;###tramp-autoload
(defcustom tramp-remote-process-environment
- `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "TMOUT=0" "LC_CTYPE=''"
+ `("TMOUT=0" "LC_CTYPE=''"
,(format "TERM=%s" tramp-terminal-type)
"EMACS=t" ;; Deprecated.
,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version)
@@ -440,6 +440,7 @@ which might have been set in the init files like ~/.profile.
Special handling is applied to the PATH environment, which should
not be set here. Instead, it should be set via `tramp-remote-path'."
:group 'tramp
+ :version "24.4"
:type '(repeat string))
(defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
@@ -3726,8 +3727,7 @@ file exists and nonzero exit status otherwise."
(with-tramp-progress-reporter
vec 5 (format "Opening remote shell `%s'" shell)
;; Find arguments for this shell.
- (let ((tramp-end-of-output tramp-initial-end-of-output)
- (alist tramp-sh-extra-args)
+ (let ((alist tramp-sh-extra-args)
item extra-args)
(while (and alist (null extra-args))
(setq item (pop alist))
@@ -3735,18 +3735,12 @@ file exists and nonzero exit status otherwise."
(setq extra-args (cdr item))))
(tramp-send-command
vec (format
- "exec env ENV='' PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
+ "exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
(tramp-shell-quote-argument tramp-end-of-output)
shell (or extra-args ""))
t))
(tramp-set-connection-property
- (tramp-get-connection-process vec) "remote-shell" shell)
- ;; Setting prompts.
- (tramp-send-command
- vec (format "PS1=%s" (tramp-shell-quote-argument tramp-end-of-output)) t)
- (tramp-send-command vec "PS2=''" t)
- (tramp-send-command vec "PS3=''" t)
- (tramp-send-command vec "PROMPT_COMMAND=''" t)))
+ (tramp-get-connection-process vec) "remote-shell" shell)))
(defun tramp-find-shell (vec)
"Opens a shell on the remote host which groks tilde expansion."
@@ -4456,6 +4450,7 @@ connection if a previous connection has died for some reason."
(delete-process p))
(setenv "TERM" tramp-terminal-type)
(setenv "LC_ALL" "en_US.utf8")
+ (setenv "HISTFILE" "/dev/null")
(setenv "PROMPT_COMMAND")
(setenv "PS1" tramp-initial-end-of-output)
(let* ((target-alist (tramp-compute-multi-hops vec))