diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el index 6f3b3245..974e3f3a 100644 --- a/lisp/tramp-sh.el +++ b/lisp/tramp-sh.el @@ -2723,6 +2723,14 @@ the result will be a local, non-Tramp, file name." (format "cd %s && pwd" (tramp-shell-quote-argument uname))) (with-current-buffer (tramp-get-buffer v) (goto-char (point-min)) + (add-to-list + 'directory-abbrev-alist + (cons + (concat + "\\`" (tramp-make-tramp-file-name v 'noloc 'nohop) + (buffer-substring (point) (point-at-eol))) + (concat + (tramp-make-tramp-file-name v 'noloc 'nohop) uname))) (buffer-substring (point) (point-at-eol))))) (setq localname (concat uname fname)))) ;; There might be a double slash, for example when "~/"