]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve Tramp host name completion
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 4 Feb 2019 15:02:46 +0000 (16:02 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 4 Feb 2019 15:02:46 +0000 (16:02 +0100)
* lisp/net/tramp-rclone.el (tramp-default-host-alist): Add empty host.

* lisp/net/tramp.el (tramp-parse-auth-sources): Require :port.

lisp/net/tramp-rclone.el
lisp/net/tramp.el

index 9f46adb4da69b3e9861449962307bbe979ce8aed..48adea068983683499567a5f764ecd8c35d310d5 100644 (file)
 
 ;;;###tramp-autoload
 (tramp--with-startup
- (add-to-list
-  'tramp-methods
-  `(,tramp-rclone-method
-    (tramp-mount-args nil)
-    (tramp-copyto-args nil)
-    (tramp-moveto-args nil)
-    (tramp-about-args ("--full")))))
+ (add-to-list 'tramp-methods
+             `(,tramp-rclone-method
+               (tramp-mount-args nil)
+               (tramp-copyto-args nil)
+               (tramp-moveto-args nil)
+               (tramp-about-args ("--full"))))
+
+ (add-to-list 'tramp-default-host-alist `(,tramp-rclone-method nil ""))
 
-;;;###tramp-autoload
-(tramp--with-startup
  (tramp-set-completion-function
   tramp-rclone-method '((tramp-rclone-parse-device-names ""))))
 
index b1c066904810bda50eefeb68b73eaa01288713fe..d000bbe3d653e303ebd496832423f245fd040cd5 100644 (file)
@@ -2867,7 +2867,8 @@ for all methods.  Resulting data are derived from default settings."
   (and tramp-completion-use-auth-sources
        (mapcar
        (lambda (x) `(,(plist-get x :user) ,(plist-get x :host)))
-       (auth-source-search :port method :max most-positive-fixnum))))
+       (auth-source-search
+        :port method :require '(:port) :max most-positive-fixnum))))
 
 ;; Generic function.
 (defun tramp-parse-group (regexp match-level skip-regexp)