Subject: bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode

From: Stefan Monnier <[email-masked]>
Date: Wed, 16 Mar 2016 20:50:39 -0400

>>> I'm getting the error 'tramp-file-name-handler: Host name must not match
>>> method "adb"'.
[...]
>   tramp-check-proper-method-and-host([#("scp" 0 3 (tramp-default t)) nil "davs" "" nil])
>   tramp-maybe-open-connection([#("scp" 0 3 (tramp-default t)) nil "davs" "" nil])
>   tramp-send-command([#("scp" 0 3 (tramp-default t)) nil "davs" "" nil] "cd ~ && pwd")
>   tramp-sh-handle-expand-file-name("/davs:" nil)
>   apply(tramp-sh-handle-expand-file-name ("/davs:" nil))
>   tramp-sh-file-name-handler(expand-file-name "/davs:" nil)
>   apply(tramp-sh-file-name-handler expand-file-name ("/davs:" nil))
>   tramp-file-name-handler(expand-file-name "/davs:" nil)
>   expand-file-name("/davs:" nil)
>   apply(expand-file-name ("/davs:" nil))
>   tramp-completion-run-real-handler(expand-file-name ("/davs:" nil))
>   tramp-completion-file-name-handler(expand-file-name "/davs:" nil)
>   file-name-all-completions("" "/davs:")
>   completion-file-name-table("/davs:" #[257

completion-file-name-table calls (file-name-all-completions "" "/davs:")
because (file-name-directory "/davs:") returns "/davs:" which seems
wrong if "/davs:" is not a valid directory name.

        Stefan