diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-04-01 18:54:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-04-01 18:54:48 +0200 |
commit | 31b7d38611541030fe54898a7d8b6a714fa0fa59 (patch) | |
tree | 37c8b04cb85c0b1c96b022f338ff6cda5eb90732 /src/ex_docmd.c | |
parent | fd3fe98b78edb10f2d439b0c6d56e6d70eecb92d (diff) |
updated for version 7.4.233v7.4.233
Problem: Escaping special characters for using "%" with a shell command is
inconsistant, parenthesis are escaped but spaces are not.
Solution: Only escape "!". (Gary Johnson)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index f1aa60798d..b616740751 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4580,25 +4580,15 @@ expand_filename(eap, cmdlinep, errormsgp) /* For a shell command a '!' must be escaped. */ if ((eap->usefilter || eap->cmdidx == CMD_bang) - && vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL) + && vim_strpbrk(repl, (char_u *)"!") != NULL) { char_u *l; - l = vim_strsave_escaped(repl, (char_u *)"!&;()<>"); + l = vim_strsave_escaped(repl, (char_u *)"!"); if (l != NULL) { vim_free(repl); repl = l; - /* For a sh-like shell escape "!" another time. */ - if (strstr((char *)p_sh, "sh") != NULL) - { - l = vim_strsave_escaped(repl, (char_u *)"!"); - if (l != NULL) - { - vim_free(repl); - repl = l; - } - } } } |