emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d43a037bc3d 1/2: Allow enabling multi-hop container completion se


From: Michael Albinus
Subject: master d43a037bc3d 1/2: Allow enabling multi-hop container completion selectively by method
Date: Thu, 31 Aug 2023 11:21:36 -0400 (EDT)

branch: master
commit d43a037bc3d691c45a8a4a53d696580752607598
Author: Gene Goykhman <gene@indigo1.com>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Allow enabling multi-hop container completion selectively by method
    
    * 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'.
---
 lisp/net/tramp-container.el | 2 +-
 lisp/net/tramp.el           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el
index 687092e7e95..a0ed9b71a9a 100644
--- a/lisp/net/tramp-container.el
+++ b/lisp/net/tramp-container.el
@@ -166,7 +166,7 @@ METHOD is the Tramp method to be used for \"ps\", either
 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))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index b34d3ff6695..754f135c315 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3009,8 +3009,8 @@ This function is added always in 
`tramp-get-completion-function'
 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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]