diff options
| author | Michael Albinus | 2014-05-06 10:42:53 +0200 |
|---|---|---|
| committer | Michael Albinus | 2014-05-06 10:42:53 +0200 |
| commit | 3e59ead144c917d4d6ae27963f0f49b4aaf28d78 (patch) | |
| tree | 0bdada1e11470d9c2984fbc9bf97581b8ea324e4 | |
| parent | 03810324a41b365104fd940ac4d8f702a914410e (diff) | |
| download | emacs-3e59ead144c917d4d6ae27963f0f49b4aaf28d78.tar.gz emacs-3e59ead144c917d4d6ae27963f0f49b4aaf28d78.zip | |
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/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 17 |
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 @@ | |||
| 1 | 2014-05-06 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp-sh.el (tramp-remote-process-environment): Remove | ||
| 4 | HISTFILE and HISTSIZE; it's too late to set them here. Add | ||
| 5 | :version entry. | ||
| 6 | (tramp-open-shell): Do not let-bind `tramp-end-of-output'. Add | ||
| 7 | "HISTSIZE=/dev/null" to the shell's env arguments. Do not send | ||
| 8 | extra "PSx=..." commands. | ||
| 9 | (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null. | ||
| 10 | (Bug#17295) | ||
| 11 | |||
| 1 | 2014-05-06 Glenn Morris <rgm@gnu.org> | 12 | 2014-05-06 Glenn Morris <rgm@gnu.org> |
| 2 | 13 | ||
| 3 | * emacs-lisp/find-gc.el (find-gc-source-directory): Give it a value. | 14 | * 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'." | |||
| 425 | 425 | ||
| 426 | ;;;###tramp-autoload | 426 | ;;;###tramp-autoload |
| 427 | (defcustom tramp-remote-process-environment | 427 | (defcustom tramp-remote-process-environment |
| 428 | `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "TMOUT=0" "LC_CTYPE=''" | 428 | `("TMOUT=0" "LC_CTYPE=''" |
| 429 | ,(format "TERM=%s" tramp-terminal-type) | 429 | ,(format "TERM=%s" tramp-terminal-type) |
| 430 | "EMACS=t" ;; Deprecated. | 430 | "EMACS=t" ;; Deprecated. |
| 431 | ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version) | 431 | ,(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. | |||
| 440 | Special handling is applied to the PATH environment, which should | 440 | Special handling is applied to the PATH environment, which should |
| 441 | not be set here. Instead, it should be set via `tramp-remote-path'." | 441 | not be set here. Instead, it should be set via `tramp-remote-path'." |
| 442 | :group 'tramp | 442 | :group 'tramp |
| 443 | :version "24.4" | ||
| 443 | :type '(repeat string)) | 444 | :type '(repeat string)) |
| 444 | 445 | ||
| 445 | (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile")) | 446 | (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile")) |
| @@ -3726,8 +3727,7 @@ file exists and nonzero exit status otherwise." | |||
| 3726 | (with-tramp-progress-reporter | 3727 | (with-tramp-progress-reporter |
| 3727 | vec 5 (format "Opening remote shell `%s'" shell) | 3728 | vec 5 (format "Opening remote shell `%s'" shell) |
| 3728 | ;; Find arguments for this shell. | 3729 | ;; Find arguments for this shell. |
| 3729 | (let ((tramp-end-of-output tramp-initial-end-of-output) | 3730 | (let ((alist tramp-sh-extra-args) |
| 3730 | (alist tramp-sh-extra-args) | ||
| 3731 | item extra-args) | 3731 | item extra-args) |
| 3732 | (while (and alist (null extra-args)) | 3732 | (while (and alist (null extra-args)) |
| 3733 | (setq item (pop alist)) | 3733 | (setq item (pop alist)) |
| @@ -3735,18 +3735,12 @@ file exists and nonzero exit status otherwise." | |||
| 3735 | (setq extra-args (cdr item)))) | 3735 | (setq extra-args (cdr item)))) |
| 3736 | (tramp-send-command | 3736 | (tramp-send-command |
| 3737 | vec (format | 3737 | vec (format |
| 3738 | "exec env ENV='' PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" | 3738 | "exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" |
| 3739 | (tramp-shell-quote-argument tramp-end-of-output) | 3739 | (tramp-shell-quote-argument tramp-end-of-output) |
| 3740 | shell (or extra-args "")) | 3740 | shell (or extra-args "")) |
| 3741 | t)) | 3741 | t)) |
| 3742 | (tramp-set-connection-property | 3742 | (tramp-set-connection-property |
| 3743 | (tramp-get-connection-process vec) "remote-shell" shell) | 3743 | (tramp-get-connection-process vec) "remote-shell" shell))) |
| 3744 | ;; Setting prompts. | ||
| 3745 | (tramp-send-command | ||
| 3746 | vec (format "PS1=%s" (tramp-shell-quote-argument tramp-end-of-output)) t) | ||
| 3747 | (tramp-send-command vec "PS2=''" t) | ||
| 3748 | (tramp-send-command vec "PS3=''" t) | ||
| 3749 | (tramp-send-command vec "PROMPT_COMMAND=''" t))) | ||
| 3750 | 3744 | ||
| 3751 | (defun tramp-find-shell (vec) | 3745 | (defun tramp-find-shell (vec) |
| 3752 | "Opens a shell on the remote host which groks tilde expansion." | 3746 | "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." | |||
| 4456 | (delete-process p)) | 4450 | (delete-process p)) |
| 4457 | (setenv "TERM" tramp-terminal-type) | 4451 | (setenv "TERM" tramp-terminal-type) |
| 4458 | (setenv "LC_ALL" "en_US.utf8") | 4452 | (setenv "LC_ALL" "en_US.utf8") |
| 4453 | (setenv "HISTFILE" "/dev/null") | ||
| 4459 | (setenv "PROMPT_COMMAND") | 4454 | (setenv "PROMPT_COMMAND") |
| 4460 | (setenv "PS1" tramp-initial-end-of-output) | 4455 | (setenv "PS1" tramp-initial-end-of-output) |
| 4461 | (let* ((target-alist (tramp-compute-multi-hops vec)) | 4456 | (let* ((target-alist (tramp-compute-multi-hops vec)) |