From 765c921e1f0281963009b3e06a94227a8c0a2408 Mon Sep 17 00:00:00 2001 From: Daisuke Suzuki Date: Thu, 3 May 2012 21:00:33 +0900 Subject: [PATCH] Fix Windows escaping on latest 7.3 patches --- plugin/fugitive.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 34a1e23..08cd41b 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1901,7 +1901,8 @@ function! s:ReplaceCmd(cmd,...) abort endif endif if &shell =~# 'cmd' - call system('cmd /c "'.prefix.s:gsub(a:cmd,'[<>]', '^^^&').' > '.tmp.'"') + let cmd_escape_char = &shellxquote == '(' ? '^' : '^^^' + call system('cmd /c "'.prefix.s:gsub(a:cmd,'[<>]', cmd_escape_char.'&').' > '.tmp.'"') else call system(' ('.prefix.a:cmd.' > '.tmp.') ') endif