6 sent and received strings
7 file caching
8 connection properties
+ 9 test commands
10 traces (huge)."
:group 'tramp
:type 'integer)
(tramp-copy-recursive t)
(tramp-password-end-of-line nil))
("scp" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-e" "none")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program "scp")
("-o" "StrictHostKeyChecking=no")))
(tramp-default-port 22))
("scp1" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-1" "-e" "none")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-1") ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program "scp")
("-o" "StrictHostKeyChecking=no")))
(tramp-default-port 22))
("scp2" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-2" "-e" "none")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-2") ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program "scp")
(tramp-copy-recursive t)
(tramp-password-end-of-line nil))
("sftp" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-e" "none")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program "sftp")
(tramp-copy-keep-date nil)
(tramp-password-end-of-line nil))
("rsync" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-e" "none")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program "rsync")
(tramp-password-end-of-line nil))
("rsyncc"
(tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
("-o" "ControlPath=%t.%%r@%%h:%%p")
("-o" "ControlMaster=yes")
- ("-e" "none")))
+ ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program "rsync")
(tramp-copy-keep-date nil)
(tramp-password-end-of-line nil))
("ssh" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-e" "none")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program nil)
("-o" "StrictHostKeyChecking=no")))
(tramp-default-port 22))
("ssh1" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-1" "-e" "none")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-1") ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program nil)
("-o" "StrictHostKeyChecking=no")))
(tramp-default-port 22))
("ssh2" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-2" "-e" "none")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-2") ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program nil)
(tramp-copy-keep-date nil)
(tramp-password-end-of-line nil))
("scpc" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
("-o" "ControlPath=%t.%%r@%%h:%%p")
("-o" "ControlMaster=yes")
- ("-e" "none")))
+ ("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program "scp")
("-o" "StrictHostKeyChecking=no")))
(tramp-default-port 22))
("scpx" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-e" "none" "-t" "-t" "/bin/sh")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-e" "none") ("-t" "-t")
+ ("%h") ("/bin/sh")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program "scp")
("-o" "StrictHostKeyChecking=no")))
(tramp-default-port 22))
("sshx" (tramp-login-program "ssh")
- (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p")
- ("-e" "none" "-t" "-t" "/bin/sh")))
+ (tramp-login-args (("-l" "%u") ("-p" "%p")
+ ("-e" "none") ("-t" "-t")
+ ("%h") ("/bin/sh")))
(tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program nil)
(defun tramp-handle-start-file-process (name buffer program &rest args)
"Like `start-file-process' for Tramp files."
(with-parsed-tramp-file-name default-directory nil
- (unless (stringp program)
- (tramp-error
- v 'file-error "pty association is not supported for `%s'" name))
(unwind-protect
- (let ((command (format "cd %s; exec %s"
- (tramp-shell-quote-argument localname)
- (mapconcat 'tramp-shell-quote-argument
- (cons program args) " ")))
+ ;; When PROGRAM is nil, we just provide a tty.
+ (let ((command
+ (when (stringp program)
+ (format "cd %s; exec %s"
+ (tramp-shell-quote-argument localname)
+ (mapconcat 'tramp-shell-quote-argument
+ (cons program args) " "))))
+ (tramp-process-connection-type
+ (or (null program) tramp-process-connection-type))
(name1 name)
(i 0))
(unless buffer
(with-current-buffer (tramp-get-connection-buffer v)
(clear-visited-file-modtime)
(narrow-to-region (point-max) (point-max)))
- ;; Send the command. `tramp-send-command' opens a new
- ;; connection.
- (tramp-send-command v command nil t) ; nooutput
+ (if (stringp program)
+ ;; Send the command. `tramp-send-command' opens a new
+ ;; connection.
+ (tramp-send-command v command nil t) ; nooutput
+ ;; Check, whether a pty is associated, and set it as
+ ;; process property.
+ (condition-case nil
+ (tramp-send-command-and-read v "echo \\\"`tty`\\\"")
+ (tramp-error
+ v 'file-error "pty association is not supported for `%s'" name)))
;; Set query flag for this process.
(tramp-set-process-query-on-exit-flag
(tramp-get-connection-process v) t)
vec (format "PS1=%s" (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-send-command vec "PROMPT_COMMAND=''" t)
+ ;; Dump tty in the traces.
+ (when (>= tramp-verbose 9)
+ (tramp-send-command vec "tty" t))))
(defun tramp-find-shell (vec)
"Opens a shell on the remote host which groks tilde expansion."
;; stty, instead.
(tramp-send-command vec "stty -onlcr" t))))
;; Dump stty settings in the traces.
- (when (>= tramp-verbose 10)
+ (when (>= tramp-verbose 9)
(tramp-send-command vec "stty -a" t))
(tramp-send-command vec "set +o vi +o emacs" t)
;; rsync).
;; * Keep a second connection open for out-of-band methods like scp or
;; rsync.
-;; * Support ptys in `tramp-handle-start-file-process'. (Bug#4604, Bug#6360)
;; * IMHO, it's a drawback that currently Tramp doesn't support
;; Unicode in Dired file names by default. Is it possible to
;; improve Tramp to set LC_ALL to "C" only for commands where Tramp