ivan-kung / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

expansion of environment variables fails in Vim backtick expression #385

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

    vim -u NONE -i NONE -N
    :e `=$HOME . '/.vimrc'` 

What is the expected output? What do you see instead?

Vim should open the .vimrc file in my HOME directory.  Instead I see the 
following error:

    E15: Invalid expression: /Users/pjuhas . '/.vimrc'

It seems that $HOME gets expanded _before_ parsing the VimL expression in 
backticks.  This would be OK for shell-expanded backtick expressions, but not 
for Vim expressions of the `=<expr>` kind.

What version of the product are you using? On what operating system?

Vim 7.4.712 on OS X Yosemite 10.10.4.  This is likely independent of the OS.

Original issue reported on code.google.com by pavol.juhas@gmail.com on 16 Jul 2015 at 6:51