From: João Távora Date: Sat, 5 Jun 2021 20:46:59 +0000 (+0100) Subject: Consider environment vars in Fido's directory-aware RET binding X-Git-Tag: emacs-28.0.90~2185 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=45d711a356b4c5e75d0b6e4391313ca34f57b4bb;p=emacs.git Consider environment vars in Fido's directory-aware RET binding Fixes: bug#48782 * lisp/icomplete.el (icomplete-fido-ret): Consider environment variables in dir expansion. --- diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 03a191cb0b6..08b4ef2030a 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -331,7 +331,8 @@ require user confirmation." (file-name-directory (icomplete--field-string)))) (current (car completion-all-sorted-completions)) (probe (and dir current - (expand-file-name (directory-file-name current) dir)))) + (expand-file-name (directory-file-name current) + (substitute-env-vars dir))))) (cond ((and probe (file-directory-p probe) (not (string= current "./"))) (icomplete-force-complete)) (t