Revert "Steal Windows shell escaping from dispatch.vim"
This reverts commit 15450eff27
.
This commit is contained in:
parent
da3f5857b5
commit
095ee57d12
@ -34,14 +34,7 @@ function! s:shellesc(arg) abort
|
|||||||
if a:arg =~ '^[A-Za-z0-9_/.-]\+$'
|
if a:arg =~ '^[A-Za-z0-9_/.-]\+$'
|
||||||
return a:arg
|
return a:arg
|
||||||
elseif &shell =~# 'cmd'
|
elseif &shell =~# 'cmd'
|
||||||
if &shellxquote ==# '"'
|
return '"'.substitute(substitute(a:arg, '"', '""""', 'g'), '%', '"%"', 'g').'"'
|
||||||
return '"' . substitute(a:arg, '"', '""', 'g') . '"'
|
|
||||||
else
|
|
||||||
let esc = exists('+shellxescape') ? &shellxescape : '"&|<>()@^'
|
|
||||||
return &shellxquote .
|
|
||||||
\ substitute(a:arg, '['.esc.']', '^&', 'g') .
|
|
||||||
\ get({'(': ')', '"(': ')"'}, &shellxquote, &shellxquote)
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
let escaped = shellescape(a:arg)
|
let escaped = shellescape(a:arg)
|
||||||
if &shell =~# 'sh' && &shell !~# 'csh'
|
if &shell =~# 'sh' && &shell !~# 'csh'
|
||||||
|
Loading…
Reference in New Issue
Block a user