diff options
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r-- | src/nvim/os_unix.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 4db84a4f12..7ec4059bce 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -1,6 +1,5 @@ /* * VIM - Vi IMproved by Bram Moolenaar - * VMS merge by Zoltan Arpadffy * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. @@ -1066,10 +1065,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. */ |