* net/tramp-sh.el (tramp-maybe-open-connection): Use it.
+2011-07-01 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-encoding-command-interactive): New defcustom.
+
+ * net/tramp-sh.el (tramp-maybe-open-connection): Use it.
+
2011-07-01 Martin Rudalics <rudalics@gmx.at>
* window.el (same-window-buffer-names, same-window-regexps)
;; This must be done in order to avoid our file name handler.
(p (let ((default-directory
(tramp-compat-temporary-file-directory)))
- (start-process
+ (apply
+ 'start-process
(tramp-get-connection-name vec)
(tramp-get-connection-buffer vec)
- tramp-encoding-shell))))
+ (if tramp-encoding-command-interactive
+ (list tramp-encoding-shell
+ tramp-encoding-command-interactive)
+ (list tramp-encoding-shell))))))
(tramp-message
vec 6 "%s" (mapconcat 'identity (process-command p) " "))
This variable can be used to change the \"/bin/sh\" part. See the
variable `tramp-encoding-command-switch' for the \"-c\" part.
+If the shell must be forced to be interactive, see
+`tramp-encoding-command-interactive'.
+
Note that this variable is not used for remote commands. There are
mechanisms in tramp.el which automatically determine the right shell to
use for the remote host."
:group 'tramp
:type 'string)
+(defcustom tramp-encoding-command-interactive
+ (unless (string-match "cmd\\.exe" tramp-encoding-shell) "-i")
+ "*Use this switch together with `tramp-encoding-shell' for interactive shells.
+See the variable `tramp-encoding-shell' for more information."
+ :group 'tramp
+ :type '(choice (const nil) string))
+
;;;###tramp-autoload
(defvar tramp-methods nil
"*Alist of methods for remote files.