Yasuhiro Matsumoto wrote:

> On Wednesday, August 27, 2014 9:58:15 PM UTC+9, mattn wrote:
> > Yes, I know.
> > 
> > But in this case, afaik, expand('$FOO') shouldn't call
> > mch_expand_wildcards().
> 
> Ooops, sorry.
> I found it.
> 
> https://code.google.com/p/vim/source/browse/src/misc1.c#10769

Actually it does not work as documented.  Even though the shell is
invoked the $ is escaped, thus no environment variables are expanded.

I can make this command work:

        echo expand('$shell')
        /bin/tcsh

However, if a file name contains a $ and what follows happens to be a
variable name, then you do not get that file name.  I would think this
is OK, a $ should be escaped to avoid the expansion, right?

-- 
>From "know your smileys":
 :-)    Funny
 |-)    Funny Oriental
 (-:    Funny Australian

 /// 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/d/optout.

Raspunde prin e-mail lui