diff --git a/lisp/tramp-container.el b/lisp/tramp-container.el index 0879d6f1..7b942532 100644 --- a/lisp/tramp-container.el +++ b/lisp/tramp-container.el @@ -163,6 +163,7 @@ see its function help for a description of the format." ("-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")))) @@ -174,6 +175,7 @@ see its function help for a description of the format." ("-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")))) @@ -186,6 +188,7 @@ see its function help for a description of the format." ("--") ("%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")))) diff --git a/lisp/tramp.el b/lisp/tramp.el index f20a1fc3..003912f8 100644 --- a/lisp/tramp.el +++ b/lisp/tramp.el @@ -4836,7 +4836,14 @@ substitution. SPEC-LIST is a list of char/value pairs used for (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