Revert "Steal Windows shell escaping from dispatch.vim"

This reverts commit 15450eff27.
This commit is contained in:
Tim Pope 2014-04-03 18:57:18 -04:00
parent da3f5857b5
commit 095ee57d12
1 changed files with 1 additions and 8 deletions

View File

@ -34,14 +34,7 @@ function! s:shellesc(arg) abort
if a:arg =~ '^[A-Za-z0-9_/.-]\+$'
return a:arg
elseif &shell =~# 'cmd'
if &shellxquote ==# '"'
return '"' . substitute(a:arg, '"', '""', 'g') . '"'
else
let esc = exists('+shellxescape') ? &shellxescape : '"&|<>()@^'
return &shellxquote .
\ substitute(a:arg, '['.esc.']', '^&', 'g') .
\ get({'(': ')', '"(': ')"'}, &shellxquote, &shellxquote)
endif
return '"'.substitute(substitute(a:arg, '"', '""""', 'g'), '%', '"%"', 'g').'"'
else
let escaped = shellescape(a:arg)
if &shell =~# 'sh' && &shell !~# 'csh'