Can I use environment variables in the find file?
As Barmar said, it works as you say ... as far as you don't use ido
or the like.
Enter C-h k C-x C-fto see if you are using an extended shell for find-file
eg ido
.
If you are using ido
, you can type C-fat the prompt to temporarily return to the old search prompt, where you can type for example (to complete to $ HOME), then write something like to complete to $ HOME / .profile, etc. etc. $HO <tab>
/.pro <tab>
If you used the other one, you should check the documentation because they probably have a fallback method.
source to share