Rodo wrote:
> Good.
>
> small patch:
>
> --- misc2_org.c 2012-02-14 18:09:38 +0800
> +++ misc2.c 2012-02-14 17:51:54 +0800
> @@ -3230,7 +3230,13 @@
> {
> STRCPY(ncmd, p_sxq);
> STRCAT(ncmd, cmd);
> - STRCAT(ncmd, p_sxq);
> + if (STRCMP(p_sxq, "(") == 0)
> + {
> + STRCAT(ncmd, ")");
> + } else
> + {
> + STRCAT(ncmd, p_sxq);
> + }
> retval = mch_call_shell(ncmd, opt);
> vim_free(ncmd);
> }
>
> shellcmdflag = /c
> shellxquote = (
>
> echo system('dir "&") pass
> echo system('echo "a&b") pass
> system('"exe have space"') pass
> system('"exe have sapce" "some arg with spaces"') pass
> system('"exe have spce" "some arg with &"') pass
Good, but it can be done in one line:
STRCAT(ncmd, STRCMP(p_sxq, "(") == 0 ? (char_u *)")" : p_sxq);
Now let's test this some more.
--
Over the years, I've developed my sense of deja vu so acutely that now
I can remember things that *have* happened before ...
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php