Bram Moolenaar wrote:
Nikolay Pavlov wrote:
It's the other way around: On MS-Windows you can do:
:e foo\$bar
That is editing the file "$bar" in directory "foo". On Unix this has a
different meaning, editing file "foo$bar", thus not using $bar as an
environment variable. That's why test 97 won't work on MS-Windows.
I had a problem with expand(fnameescape('$HOME')): here '$HOME' is assumed
to be ./$HOME and fnameescape() does not cope with this. Same for ./a$HOME:
it tries to edit either ./aC:... (which is impossible due to requirement
not to have colon in the filename) or ./a/$HOME. There is a bug here.
It's a problem, since:
:e $HOME
Means to expand the environment variable $HOME, while
:e \$HOME
Might mean editing the file "$HOME" in the current drive.
Backslash escaping just doesn't work here. Perhaps we should require
Windows style environment variables:
:e %HOME%
That's not backwards compatible though.
Removing $HOME as expandable under Windows to the environment variable
value would definitely break some plugins I have.
I think having %HOME% work under Windows would not be a problem, so
expand(fnameescape('%HOME%')) could work, too.
Regards,
Chip Campbell
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.