[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1d42f48: Fix hostname completion on MS Windows
From: |
Michael Albinus |
Subject: |
master 1d42f48: Fix hostname completion on MS Windows |
Date: |
Fri, 9 Apr 2021 03:57:15 -0400 (EDT) |
branch: master
commit 1d42f4800bc3759ac961b97b2a66d4b73e520eb5
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Michael Albinus <michael.albinus@gmx.de>
Fix hostname completion on MS Windows
* lisp/net/tramp.el (tramp-completion-file-name-regexp-default):
Handle volume letter being added to paths for file name completion on W32
systems. This fixes hostname (and method) autocomplete on W32.
Copyright-paperwork-exempt: yes
---
lisp/net/tramp.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index b2c650f..e61c3b1 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1078,7 +1078,13 @@ initial value is overwritten by the car of
`tramp-file-name-structure'.")
(defconst tramp-completion-file-name-regexp-default
(concat
- "\\`/\\("
+ "\\`"
+ ;; `file-name-completion' uses absolute paths for matching. This
+ ;; means that on W32 systems, something like "/ssh:host:~/path"
+ ;; becomes "c:/ssh:host:~/path". See also `tramp-drop-volume-letter'.
+ (when (eq system-type 'windows-nt)
+ "\\(?:[[:alpha:]]:\\)?")
+ "/\\("
;; Optional multi hop.
"\\([^/|:]+:[^/|:]*|\\)*"
;; Last hop.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1d42f48: Fix hostname completion on MS Windows,
Michael Albinus <=