* lisp/net/tramp-container.el: Check if METHOD is a member of
`tramp-container-multi-hop-methods' before attempting completion.
* lisp/net/tramp.el: Add custom variable
`tramp-container-multi-hop-methods'.
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(let ((default-directory
- (or (and tramp-completion-remote-containers tramp--last-hop-directory)
+ (or (and (member method tramp-completion-multi-hop-methods) tramp--last-hop-directory)
tramp-compat-temporary-file-directory))
(program (tramp-get-method-parameter
(make-tramp-file-name :method method) 'tramp-login-program))
for all methods. Resulting data are derived from default settings."
`((,(tramp-find-user method nil nil) ,(tramp-find-host method nil nil))))
-(defcustom tramp-completion-remote-containers nil
- "Whether container hosts in multi-hop paths should be queried for completions."
+(defcustom tramp-completion-multi-hop-methods `(,tramp-docker-method ,tramp-podman-method)
+ "Methods for which to attempt to provide completions over multi-hop connections."
:version "30.1"
:type 'boolean)