aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2011-12-29 12:34:44 +0100
committerMichael Albinus2011-12-29 12:34:44 +0100
commit98c8795ab766f4fb8d94db4ee1b0fb29fae31c07 (patch)
tree9cac30c7f3636fd06e56d49c313489b920cad56e
parentd23ab8e8726ecb7e3554644857b4a58e5f7408f1 (diff)
downloademacs-98c8795ab766f4fb8d94db4ee1b0fb29fae31c07.tar.gz
emacs-98c8795ab766f4fb8d94db4ee1b0fb29fae31c07.zip
* net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property
also for alternative shells. (tramp-open-connection-setup-interactive-shell): Check, whether the shell is a busybox. (tramp-send-command): Don't suppress multiple prompts for busyboxes, it hurts.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/net/tramp-sh.el17
2 files changed, 24 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 78cc1862c2f..c66322b56fe 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12011-12-29 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property
4 also for alternative shells.
5 (tramp-open-connection-setup-interactive-shell): Check, whether
6 the shell is a busybox.
7 (tramp-send-command): Don't suppress multiple prompts for
8 busyboxes, it hurts.
9
12011-12-28 Chong Yidong <cyd@gnu.org> 102011-12-28 Chong Yidong <cyd@gnu.org>
2 11
3 * progmodes/gdb-mi.el (gdb-get-source-file-list) 12 * progmodes/gdb-mi.el (gdb-get-source-file-list)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 446a27c65d3..994e1a03f97 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3618,7 +3618,8 @@ file exists and nonzero exit status otherwise."
3618 vec 'file-error 3618 vec 'file-error
3619 "Couldn't find a shell which groks tilde expansion")) 3619 "Couldn't find a shell which groks tilde expansion"))
3620 (tramp-message 3620 (tramp-message
3621 vec 5 "Starting remote shell `%s' for tilde expansion" shell) 3621 vec 5 "Starting remote shell `%s' for tilde expansion"
3622 (tramp-set-connection-property vec "remote-shell" shell))
3622 (tramp-open-shell vec shell)) 3623 (tramp-open-shell vec shell))
3623 3624
3624 (t (tramp-message 3625 (t (tramp-message
@@ -3785,6 +3786,17 @@ process to set up. VEC specifies the connection."
3785 ;; Disable unexpected output. 3786 ;; Disable unexpected output.
3786 (tramp-send-command vec "mesg n; biff n" t) 3787 (tramp-send-command vec "mesg n; biff n" t)
3787 3788
3789 ;; Busyboxes tend to behave strange. We check for the existence.
3790 (with-connection-property vec "busybox"
3791 (tramp-send-command
3792 vec
3793 (format
3794 "%s --version" (tramp-get-connection-property vec "remote-shell" "echo"))
3795 t)
3796 (with-current-buffer (process-buffer proc)
3797 (let ((case-fold-search t))
3798 (and (string-match "busybox" (buffer-string)) t))))
3799
3788 ;; IRIX64 bash expands "!" even when in single quotes. This 3800 ;; IRIX64 bash expands "!" even when in single quotes. This
3789 ;; destroys our shell functions, we must disable it. See 3801 ;; destroys our shell functions, we must disable it. See
3790 ;; <http://stackoverflow.com/questions/3291692/irix-bash-shell-expands-expression-in-single-quotes-yet-shouldnt>. 3802 ;; <http://stackoverflow.com/questions/3291692/irix-bash-shell-expands-expression-in-single-quotes-yet-shouldnt>.
@@ -4397,7 +4409,8 @@ function waits for output unless NOOUTPUT is set."
4397 ;; We mark the command string that it can be erased in the output buffer. 4409 ;; We mark the command string that it can be erased in the output buffer.
4398 (tramp-set-connection-property p "check-remote-echo" t) 4410 (tramp-set-connection-property p "check-remote-echo" t)
4399 (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark))) 4411 (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark)))
4400 (when (string-match "<<'EOF'" command) 4412 (when (and (string-match "<<'EOF'" command)
4413 (not (tramp-get-connection-property vec "busybox" nil)))
4401 ;; Unset $PS1 when using here documents, in order to avoid 4414 ;; Unset $PS1 when using here documents, in order to avoid
4402 ;; multiple prompts. 4415 ;; multiple prompts.
4403 (setq command (concat "(PS1= ; " command "\n)"))) 4416 (setq command (concat "(PS1= ; " command "\n)")))