I'd like to use environmental variables in find-file command. Something like this:
C-x C-f $ENV_VAR/foo.txt
Does find-file have this functionality? What is the syntax?
As Barmar said, it works as you say... as far as you are not using ido
or similar.
Type C-h k C-x C-f to know if you are using any enhanced wrapper for find-file
, like for instance ido
.
If you are using ido
, you can type C-f in the prompt to revert back temporarily to the old plain find-file prompt, where you can type for instance $HO <tab>
(to complete to $HOME), then write something like /.pro <tab>
to complete to $HOME/.profile, etc.
If you were using another, you should check the documentation because they probably have a fallback method to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With