Commit d49458c4 authored by Roland McGrath's avatar Roland McGrath
Browse files

(comint-dynamic-complete): Expand PATHDIR in call to file-name-completion.

parent 5065f906
......@@ -1184,8 +1184,15 @@ it just adds completion characters to the end of the filename."
(let* ((pathname (comint-match-partial-pathname))
(pathdir (file-name-directory pathname))
(pathnondir (file-name-nondirectory pathname))
(completion (file-name-completion pathnondir
(or pathdir default-directory))))
(completion (file-name-completion
;; It is important to expand PATHDIR because
;; default-directory might be a handled name, and the
;; unexpanded PATHDIR won't necessarily match the
;; handler regexp.
(if pathdir
(expand-file-name pathdir)
(cond ((null completion)
(message "No completions of %s" pathname)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment