diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-02-19 18:19:30 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-02-19 18:19:30 +0100 |
commit | 034b115568a1fc40b374b0b755d89f0a40f6d940 (patch) | |
tree | b2e6a8d5cd41cfe50311996e1fb8e6935981a5c8 /src/misc2.c | |
parent | 5dc6252d331013e397a8d71e8f7ee9fd1cf514c1 (diff) | |
download | vim-034b115568a1fc40b374b0b755d89f0a40f6d940.zip |
updated for version 7.3.445
Problem: Can't properly escape commands for cmd.exe.
Solution: Default 'shellxquote' to '('. Append ')' to make '(command)'.
No need to use "/s" for 'shellcmdflag'.
Diffstat (limited to 'src/misc2.c')
-rw-r--r-- | src/misc2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/misc2.c b/src/misc2.c index 00d1ff4a0..fc38cd029 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -3230,7 +3230,11 @@ call_shell(cmd, opt) { STRCPY(ncmd, p_sxq); STRCAT(ncmd, cmd); - STRCAT(ncmd, p_sxq); + /* When 'shellxquote' is ( append ). + * When 'shellxquote' is "( append )". */ + STRCAT(ncmd, STRCMP(p_sxq, "(") == 0 ? (char_u *)")" + : STRCMP(p_sxq, "\"(") == 0 ? (char_u *)")\"" + : p_sxq); retval = mch_call_shell(ncmd, opt); vim_free(ncmd); } |