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.

-- 
The Law of VIM:
For each member b of the possible behaviour space B of program P, there exists
a finite time t before which at least one user u in the total user space U of
program P will request b becomes a member of the allowed behaviour space B'
(B' <= B).
In other words: Sooner or later everyone wants everything as an option.
                                        -- Vince Negri

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.


Raspunde prin e-mail lui