[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106742: * net/tramp-sh.el (tramp-fin
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106742: * net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property |
Date: |
Thu, 29 Dec 2011 12:34:44 +0100 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106742
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2011-12-29 12:34:44 +0100
message:
* 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.
modified:
lisp/ChangeLog
lisp/net/tramp-sh.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-12-28 05:23:47 +0000
+++ b/lisp/ChangeLog 2011-12-29 11:34:44 +0000
@@ -1,3 +1,12 @@
+2011-12-29 Michael Albinus <address@hidden>
+
+ * 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.
+
2011-12-28 Chong Yidong <address@hidden>
* progmodes/gdb-mi.el (gdb-get-source-file-list)
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2011-12-14 21:05:20 +0000
+++ b/lisp/net/tramp-sh.el 2011-12-29 11:34:44 +0000
@@ -3618,7 +3618,8 @@
vec 'file-error
"Couldn't find a shell which groks tilde expansion"))
(tramp-message
- vec 5 "Starting remote shell `%s' for tilde expansion" shell)
+ vec 5 "Starting remote shell `%s' for tilde expansion"
+ (tramp-set-connection-property vec "remote-shell" shell))
(tramp-open-shell vec shell))
(t (tramp-message
@@ -3785,6 +3786,17 @@
;; Disable unexpected output.
(tramp-send-command vec "mesg n; biff n" t)
+ ;; Busyboxes tend to behave strange. We check for the existence.
+ (with-connection-property vec "busybox"
+ (tramp-send-command
+ vec
+ (format
+ "%s --version" (tramp-get-connection-property vec "remote-shell" "echo"))
+ t)
+ (with-current-buffer (process-buffer proc)
+ (let ((case-fold-search t))
+ (and (string-match "busybox" (buffer-string)) t))))
+
;; IRIX64 bash expands "!" even when in single quotes. This
;; destroys our shell functions, we must disable it. See
;;
<http://stackoverflow.com/questions/3291692/irix-bash-shell-expands-expression-in-single-quotes-yet-shouldnt>.
@@ -4397,7 +4409,8 @@
;; We mark the command string that it can be erased in the output buffer.
(tramp-set-connection-property p "check-remote-echo" t)
(setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark)))
- (when (string-match "<<'EOF'" command)
+ (when (and (string-match "<<'EOF'" command)
+ (not (tramp-get-connection-property vec "busybox" nil)))
;; Unset $PS1 when using here documents, in order to avoid
;; multiple prompts.
(setq command (concat "(PS1= ; " command "\n)")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106742: * net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property,
Michael Albinus <=