From 45d711a356b4c5e75d0b6e4391313ca34f57b4bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sat, 5 Jun 2021 21:46:59 +0100 Subject: [PATCH] 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. --- lisp/icomplete.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2