Commit 3e59ead1 authored by Michael Albinus's avatar Michael Albinus
Browse files

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.
parent 03810324
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.
......
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment