vim-patch:7.4.423

Problem:    expand("$shell") does not work as documented.
Solution:   Do not escape the $ when expanding environment variables.

https://code.google.com/p/vim/source/detail?r=v7-4-423
This commit is contained in:
Florian Walch
2014-12-18 15:35:13 +01:00
parent 1eef530351
commit c780075afa
5 changed files with 10 additions and 7 deletions

View File

@@ -1066,10 +1066,12 @@ int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file,
|| pat[i][j + 1] == '`')
*p++ = '\\';
++j;
} else if (!intick && vim_strchr(SHELL_SPECIAL,
pat[i][j]) != NULL)
} else if (!intick
&& ((flags & EW_KEEPDOLLAR) == 0 || pat[i][j] != '$')
&& vim_strchr(SHELL_SPECIAL, pat[i][j]) != NULL)
/* Put a backslash before a special character, but not
* when inside ``. */
* when inside ``. And not for $var when EW_KEEPDOLLAR is
* set. */
*p++ = '\\';
/* Copy one character. */