[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d5c6bf9: Do not expand default method, user, host in remote file
From: |
Michael Albinus |
Subject: |
master d5c6bf9: Do not expand default method, user, host in remote file name completion |
Date: |
Tue, 7 Sep 2021 08:36:15 -0400 (EDT) |
branch: master
commit d5c6bf96256568e4654860a15ef37c03293ad71f
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Do not expand default method, user, host in remote file name completion
* lisp/net/tramp.el (tramp-completion-handle-file-name-all-completions):
Do not expand default method, user, host. (Bug#50387)
(tramp-get-completion-methods): `partial-method' can be nil.
---
lisp/net/tramp.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 9ed9da9..0182248 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2821,6 +2821,15 @@ not in completion mode."
"Like `file-name-all-completions' for partial Tramp files."
(let ((fullname
(tramp-drop-volume-letter (expand-file-name filename directory)))
+ ;; When `tramp-syntax' is `simplified', we need a default method.
+ (tramp-default-method
+ (and (zerop (length tramp-postfix-method-format))
+ tramp-default-method))
+ (tramp-default-method-alist
+ (and (zerop (length tramp-postfix-method-format))
+ tramp-default-method-alist))
+ tramp-default-user tramp-default-user-alist
+ tramp-default-host tramp-default-host-alist
hop result result1)
;; Suppress hop from completion.
@@ -3006,7 +3015,7 @@ remote host and localname (filename on remote host)."
"Return all method completions for PARTIAL-METHOD."
(mapcar
(lambda (method)
- (and method (string-prefix-p partial-method method)
+ (and method (string-prefix-p (or partial-method "") method)
(tramp-completion-make-tramp-file-name method nil nil nil)))
(mapcar #'car tramp-methods)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d5c6bf9: Do not expand default method, user, host in remote file name completion,
Michael Albinus <=