@itemize
@item
-It works only for connection methods defined in @file{tramp-adb.el},
-@file{tramp-sh.el} and @file{tramp-sshfs.el}.
+It works only for some connection methods defined in
+@file{tramp-adb.el}, @file{tramp-container.el}, @file{tramp-sh.el} and
+@file{tramp-sshfs.el}.
@item
It does not support interactive user authentication. With
'("mock"
(tramp-login-program "sh")
(tramp-login-args (("-i")))
+ (tramp-direct-async ("-c"))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
("-u" "%u")
("%h")
("%l")))
+ (tramp-direct-async (,tramp-default-remote-shell "-c"))
(tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-i" "-c"))))
("-u" "%u")
("%h")
("%l")))
+ (tramp-direct-async (,tramp-default-remote-shell "-c"))
(tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-i" "-c"))))
("--")
("%l")))
(tramp-config-check tramp-kubernetes--current-context-data)
+ (tramp-direct-async (,tramp-default-remote-shell "-c"))
(tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-i" "-c"))))
* `tramp-direct-async'
Whether the method supports direct asynchronous processes.
- Until now, just \"ssh\"-based, \"sshfs\"-based and
- \"adb\"-based methods do.
+ Until now, just \"ssh\"-based, \"sshfs\"-based, \"adb\"-based
+ and container methods do. If it is a list of strings, they
+ are used to construct the remote command.
* `tramp-config-check'
A function to be called with one argument, VEC. It should
(command
(append
`("cd" ,(tramp-shell-quote-argument localname) "&&" "(" "env")
- env `(,command ")"))))
+ env `(,command ")")))
+ ;; Add remote shell if needed.
+ (command
+ (if (consp (tramp-get-method-parameter v 'tramp-direct-async))
+ (append
+ (tramp-get-method-parameter v 'tramp-direct-async)
+ `(,(mapconcat #'identity command " ")))
+ command)))
;; Check for `tramp-sh-file-name-handler', because something
;; is different between tramp-sh.el, and tramp-adb.el or
((eq system-type 'windows-nt) null-device)
(t (add-to-list
'tramp-methods
- '("mock"
- (tramp-login-program "sh")
+ `("mock"
+ (tramp-login-program ,tramp-default-remote-shell)
(tramp-login-args (("-i")))
- (tramp-remote-shell "/bin/sh")
+ (tramp-direct-async ("-c"))
+ (tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
(add-to-list