0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

updated for version 7.4.423

Problem:    expand("$shell") does not work as documented.
Solution:   Do not escape the $ when expanding environment variables.
This commit is contained in:
Bram Moolenaar
2014-08-29 12:58:44 +02:00
parent 49f9dd7b91
commit e4df164692
4 changed files with 11 additions and 5 deletions

View File

@@ -5939,10 +5939,12 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
*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. */